Sign in to follow this  
Followers 0

@SW_SHOW without Focus

4 posts in this topic

Posted

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

Share this post


Link to post
Share on other sites



Posted

@SW_SHOWNOACTIVATE

SlowCoder74 likes this

Share this post


Link to post
Share on other sites

Posted

@SW_SHOWNOACTIVATE

I think that is exactly what I needed. Thanks!

Share this post


Link to post
Share on other sites

Posted

Have you looked at Melba's signature for the Toast UDF?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0




  • Recently Browsing   0 members

    No registered users viewing this page.