Jump to content

MsgBox pops up UNDER other windows - workaround


Recommended Posts

Sometimes when I call several MsgBox's they start popping up under other windows, which the requires ALT + TAB or click the taskbar icon.

I just wanted to share this workaround:

Just add a simple GUI in your program:

#include <GUIConstantsEx.au3>
$Form1 = GUICreate("Form1", 1, 1, 0, 0)
GUISetState(@SW_SHOW)

The GUI window size here is 1x1 so it will be nearly invisible, and at the top-left of your screen.

It seems as long as that GUI is there all MsgBox's appear on top!

I only tend to create several MsgBox's in a row when I'm actually writing and testing scripts, so the GUI being there is no big deal (I just remove/comment the GUI creation right before I build the .EXE).

Have a great day!!!

 

 

Link to comment
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
 Share

×
×
  • Create New...