Method: WinWindow#switch_to!

Defined in:
lib/winwindow.rb

#switch_to!(alt_tab = false) ⇒ Object

switch focus and bring to the foreground

the argument alt_tab, if true, indicates that the window is being switched to using the Alt/Ctl+Tab key sequence. This argument should be false otherwise.

msdn.microsoft.com/en-us/library/ms633553(VS.85).aspx



585
586
587
# File 'lib/winwindow.rb', line 585

def switch_to!(alt_tab=false)
  WinUser.SwitchToThisWindow(hwnd, alt_tab ? WIN_TRUE : WIN_FALSE)
end