Extended MsgBox functions: Specify Location and Display Time.

Category:
Miscellaneous
Type:
Modules
Difficulty:
Intermediate
Author:
Anonymous

Version Compatibility: Visual Basic 6

More information:
This code provides two extended MsgBox functions: MsgBoxMove and MsgBoxPause.

  1. MsgBoxMove function allows you to display your message box at a location specified by you: Syntax: MsgBoxMove(hwnd, Message, Title, Buttons, X, Y)
  2. MsgBoxPause function allows you to have the message box automatically disappear, after pausing for a number of seconds specified by you. Syntax: MsgboxPause(hwnd, Message, Title, Buttons, Seconds)
Like the Msgbox function, each is capable of returning the value of the button clicked.

The project consists of two files: MsgBoxEx.bas and MsgBoxEx.frm. The former contains the functions and the latter exemplifies the use of them.

Usage: Include the MsgboxEx.bas (less than 50 lines in total) in your project and you have these two functions at your disposal.


Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download msgboxex.zip