Search code examples
vbscriptmessagebox

Create vbscript messagebox that stays on top and blocks other windows


Help me please to create a messagebox which stays always on top, and user can't use other windows functions like calling start menu or interacting with other windows until he presses the OK button on messagebox.


Solution

  • The second parameter of the MsgBox function allows you to specify options for the dialog.

    MsgBox "Hello, World!", vbSystemModal
    

    For more information, see my article Mastering the Message Box.