ACAT.Lib.Core.Utility.Windows.SetForegroundWindow C# (CSharp) Метод

SetForegroundWindow() публичный статический Метод

Sets the fg window to the specified window
public static SetForegroundWindow ( IntPtr hwnd ) : bool
hwnd System.IntPtr window handle
Результат bool
        public static bool SetForegroundWindow(IntPtr hwnd)
        {
            bool retVal = false;
            try
            {
                retVal = User32Interop.SetForegroundWindow(hwnd);
            }
            catch { }
            return retVal;
        }

Usage Example

Пример #1
0
 /// <summary>
 /// Set focus to this scanner
 /// </summary>
 /// <param name="sender">event sender</param>
 /// <param name="e">event args</param>
 private void SwitchLanguageScanner_Shown(object sender, EventArgs e)
 {
     Windows.SetForegroundWindow(Handle);
     Windows.ClickOnWindow(this);
 }
All Usage Examples Of ACAT.Lib.Core.Utility.Windows::SetForegroundWindow