Пример #1
0
 public void BringToFront()
 {
     if (Control.WindowState == swf.FormWindowState.Minimized)
     {
         Control.WindowState = swf.FormWindowState.Normal;
     }
     Control.Activate();
 }
Пример #2
0
        public void BringToFront()
        {
            if (Control.WindowState == sw.WindowState.Minimized)
            {
                Control.WindowState = sw.WindowState.Normal;
            }

            if (!Control.Focusable)
            {
                var hWnd = WindowHandle;
                if (hWnd != IntPtr.Zero)
                {
                    Win32.SetWindowPos(hWnd, Win32.HWND_TOP, 0, 0, 0, 0, Win32.SWP.NOSIZE | Win32.SWP.NOMOVE);
                }
            }
            else
            {
                Control.Activate();
            }
        }