@@ -43,15 +43,28 @@ public static class Win32
4343 [ DllImport ( "user32.dll" ) ]
4444 public static extern bool ShowWindow ( IntPtr handle , int flags ) ;
4545
46+ [ DllImport ( "user32.dll" ) ]
47+ public static extern bool SetActiveWindow ( IntPtr handle ) ;
48+
4649 [ DllImport ( "user32.dll" ) ]
4750 public static extern bool SetForegroundWindow ( IntPtr handle ) ;
4851
52+ [ DllImport ( "user32.dll" ) ]
53+ public static extern bool SetFocus ( IntPtr handle ) ;
54+
55+ [ DllImport ( "user32.dll" ) ]
56+ public static extern bool SetCapture ( IntPtr handle ) ;
57+
58+ [ DllImport ( "user32.dll" ) ]
59+ public static extern bool EnableWindow ( IntPtr handle , bool enable ) ;
60+
4961 public delegate bool EnumWindowProc ( IntPtr hWnd , IntPtr lParam ) ;
5062
5163 public static int HWND_TOPMOST = - 1 ;
5264 public static int HWND_NOTOPMOST = - 2 ;
5365
5466 public const int WM_ACTIVATE = 0x0006 ;
67+ public const int WM_NCACTIVATE = 0x0086 ;
5568 public const int WM_SETREDRAW = 0x000B ;
5669 public const int WM_CLOSE = 0x0010 ;
5770 public const int WM_SHOWWINDOW = 0x0018 ;
@@ -69,6 +82,11 @@ public static class Win32
6982 public const int WM_SYSKEYDOWN = 0x0104 ;
7083 public const int WM_SYSKEYUP = 0x0105 ;
7184
85+ public const int SW_SHOWNORMAL = 1 ;
86+
87+ public const int WA_ACTIVE = 1 ;
88+ public const int WA_CLICKACTIVE = 2 ;
89+
7290 public const int SWP_NOSIZE = 0x0001 ;
7391 public const int SWP_NOMOVE = 0x0002 ;
7492 public const int SWP_NOACTIVATE = 0x0010 ;
0 commit comments