@@ -27,12 +27,12 @@ public static class NativeMan
27
27
public const int CS_DBLCLKS = 0x8 ;
28
28
public const int WM_NCPAINT = 0x0085 ;
29
29
public const int WM_ACTIVATEAPP = 0x001C ;
30
+ public const int SW_SHOW = 5 ;
31
+ public const int SEE_MASK_INVOKEIDLIST = 12 ;
32
+ public const int WS_EX_TRANSPARENT = 0x20 ;
30
33
31
34
// ENUMS
32
35
33
- /// <summary>
34
- /// Represents possible dialogbox command id values by the MB_GetString function.
35
- /// </summary>
36
36
public enum DialogBoxCommandID : int
37
37
{
38
38
IDOK = 0 ,
@@ -78,6 +78,31 @@ public struct MARGINS
78
78
public int Bottom ;
79
79
}
80
80
81
+ [ StructLayout ( LayoutKind . Sequential ) ]
82
+ public struct SHELLEXECUTEINFO
83
+ {
84
+ public int cbSize ;
85
+ public uint fMask ;
86
+ public IntPtr hwnd ;
87
+ [ MarshalAs ( UnmanagedType . LPTStr ) ]
88
+ public string lpVerb ;
89
+ [ MarshalAs ( UnmanagedType . LPTStr ) ]
90
+ public string lpFile ;
91
+ [ MarshalAs ( UnmanagedType . LPTStr ) ]
92
+ public string lpParameters ;
93
+ [ MarshalAs ( UnmanagedType . LPTStr ) ]
94
+ public string lpDirectory ;
95
+ public int nShow ;
96
+ public IntPtr hInstApp ;
97
+ public IntPtr lpIDList ;
98
+ [ MarshalAs ( UnmanagedType . LPTStr ) ]
99
+ public string lpClass ;
100
+ public IntPtr hkeyClass ;
101
+ public uint dwHotKey ;
102
+ public IntPtr hIcon ;
103
+ public IntPtr hProcess ;
104
+ }
105
+
81
106
// KERNEL32 METHODS
82
107
83
108
[ DllImport ( "kernel32" , SetLastError = true , CharSet = CharSet . Ansi ) ]
@@ -88,6 +113,9 @@ public struct MARGINS
88
113
89
114
// USER32 METHODS
90
115
116
+ [ DllImport ( "user32.dll" , SetLastError = true , CharSet = CharSet . Unicode ) ]
117
+ public static extern bool SetProcessDPIAware ( ) ;
118
+
91
119
[ DllImport ( "user32.dll" , SetLastError = true , CharSet = CharSet . Unicode ) ]
92
120
public static extern IntPtr MB_GetString ( int strId ) ;
93
121
@@ -131,6 +159,11 @@ public struct MARGINS
131
159
[ DllImport ( "Gdi32.dll" , EntryPoint = "CreateRoundRectRgn" ) ]
132
160
public static extern IntPtr CreateRoundRectRgn ( int nLeftRect , int nTopRect , int nRightRect , int nBottomRect , int nWidthEllipse , int nHeightEllipse ) ;
133
161
162
+ // SHELL32 METHODS
163
+
164
+ [ DllImport ( "shell32.dll" , SetLastError = true , CharSet = CharSet . Unicode ) ]
165
+ public static extern bool ShellExecuteEx ( ref SHELLEXECUTEINFO lpExecInfo ) ;
166
+
134
167
// CUSTOM METHODS
135
168
136
169
public static string GetMessageBoxText ( DialogBoxCommandID messageId )
0 commit comments