Jump to content

In MsgBox, how do SystemModal and TopMost differ?


Recommended Posts

I'm probably just being dense but when I run both of these scripts (compiled) I don't detect any difference in the user experience. (am running Windows 8.1 64b)

SystemModal

#include <GUIConstantsEx.au3>
 #include <MsgBoxConstants.au3>

 $hGUI = GUICreate("Test", 500, 500)
 GUISetState()

 MsgBox($MB_SYSTEMMODAL, "SystemModal", "Press me to continue")

 While 1
     Switch GUIGetMsg()
         Case $GUI_EVENT_CLOSE
             Exit
     EndSwitch
 WEnd

 

TopMost

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

 $hGUI = GUICreate("Test", 500, 500)
 GUISetState()

 MsgBox($MB_TOPMOST, "TopMost", "Press me to continue")

 While 1
     Switch GUIGetMsg()
         Case $GUI_EVENT_CLOSE
             Exit
     EndSwitch
 WEnd

 

 

Link to comment
Share on other sites

There is not an icon on the top left of the window using the $MB_TOPMOST. 

$MB_SYSTEMMODAL 4096    System modal (dialog has an icon)

$MB_TOPMOST 262144  MsgBox() has top-most attribute set

 

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

There is not an icon on the top left of the window using the $MB_TOPMOST. 

$MB_SYSTEMMODAL 4096    System modal (dialog has an icon)

$MB_TOPMOST 262144  MsgBox() has top-most attribute set

 

Thank you, MikahS, you are correct sir!  I had not noticed the icon. 

I thought SystemModal had more to do with "blocking", but it doesn't seem to block any more than TopMost. Maybe the icon is the only diff.

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...