Jump to content



Photo

@SW_SHOW without Focus


  • Please log in to reply
3 replies to this topic

#1 SlowCoder74

SlowCoder74

    Prodigy

  • Active Members
  • PipPipPip
  • 171 posts

Posted 27 November 2012 - 04:30 PM

#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?







#2 IanN1990

IanN1990

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 532 posts

Posted 27 November 2012 - 05:08 PM

@SW_SHOWNOACTIVATE
  • SlowCoder74 likes this

#3 SlowCoder74

SlowCoder74

    Prodigy

  • Active Members
  • PipPipPip
  • 171 posts

Posted 27 November 2012 - 05:16 PM

@SW_SHOWNOACTIVATE

I think that is exactly what I needed. Thanks!

#4 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 18,153 posts

Posted 28 November 2012 - 12:50 AM

Have you looked at Melba's signature for the Toast UDF?
UDF List:
Spoiler
Updated: 31/03/2015




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users