#Region ### START Koda GUI section ### Form= $frmStatePopup = GUICreate("", 227, 42, 1, 1,$WS_POPUPWINDOW,$WS_EX_TOPMOST,WinGetHandle(AutoItWinGetTitle())) ;$frmStatePopup = GUICreate("", 227, 42, 1, 1,$WS_POPUPWINDOW,Default,WinGetHandle(AutoItWinGetTitle())) GUISetBkColor(0x800000) $lblStateNotify = GUICtrlCreateLabel("TEST", 8, 8, 212, 28) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_HIDE) #EndRegion ### END Koda GUI section ###
Whenever I use GUISetState(@SW_SHOW,$frmStatePopup) to popup the window, it steals focus. This is just a popup window, and I don't want focus transferred from the user's current window.
I could go the route of getting the current window's hwnd, then showing the popup, then quickly refocussing on the user's window again.
... But is there a better way?