SetActiveWindow() private method

private SetActiveWindow ( IntPtr hWnd ) : IntPtr
hWnd System.IntPtr
return System.IntPtr
Esempio n. 1
0
 internal void Activate()
 {
     if (hwndSource != null)
     {
         if (hwndSource.Handle != IntPtr.Zero)
         {
             NativeMethods.SetActiveWindow(hwndSource.Handle);
         }
     }
 }
Esempio n. 2
0
        private static void Activate(Popup popup)
        {
            if (!openedHandlesByPopup.ContainsKey(popup))
            {
                return;
            }
            IntPtr handle = openedHandlesByPopup[popup];

            NativeMethods.SetActiveWindow(handle);
            NativeMethods.SetForegroundWindow(handle);
        }