File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/Samples.UITest/UITest.Core Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 6
6
using System . Globalization ;
7
7
using System . Reflection ;
8
8
using System . Runtime . CompilerServices ;
9
+ using System . Runtime . InteropServices ;
9
10
using Xunit . Abstractions ;
10
11
11
12
namespace UITest ;
@@ -17,6 +18,7 @@ public abstract class UITestBase : IDisposable
17
18
18
19
static UITestBase ( )
19
20
{
21
+ NativeMethods . SetProcessDPIAware ( ) ;
20
22
CultureInfo . DefaultThreadCurrentCulture = new CultureInfo ( "en-US" ) ;
21
23
22
24
Mouse . MovePixelsPerMillisecond = 2 ;
@@ -111,4 +113,11 @@ public void Dispose()
111
113
if ( File . Exists ( file ) ) File . Delete ( file ) ;
112
114
}
113
115
}
116
+
117
+
118
+ private static class NativeMethods
119
+ {
120
+ [ DllImport ( "user32.dll" , SetLastError = true ) ]
121
+ public static extern bool SetProcessDPIAware ( ) ;
122
+ }
114
123
}
You can’t perform that action at this time.
0 commit comments