public static void ActivateWindowRepeat(IntPtr handle, int count) { for (int i = 0; NativeMethods.GetForegroundWindow() != handle && i < count; i++) { NativeMethods.BringWindowToTop(handle); Thread.Sleep(1); Application.DoEvents(); } }
public static void ActivateWindowRepeat(IntPtr handle, int count) { for (int i = 0; NativeMethods.GetForegroundWindow() != handle && i < count; i++) { NativeMethods.BringWindowToTop(handle); Thread.Sleep(1); Application.DoEvents(); } }