Message Box Replacement that Doesn't beep

Category:
Miscellaneous
Type:
Modules
Difficulty:
Intermediate
Author:
Joe Hart

Version Compatibility: Visual Basic 6

More information:
This is a message box replacement that doesn't beep.

It provides the MBox function, which replaces the VB MsgBox (and the WIN32 API Messagebox function). It is similar VB message boxes, however it does not support icons. If this routine can not handle the request for the message box, it passes the commands it received to a standard message box. Thus, you can always use this message box first, knowing that a message box will be created.

The main reason to use this instead of a normal message box is the fact that when you call a normal message box, it ALWAYS beeps. There is no way to stop the beep from occurring other than change the user's sound setting, which is not recommended. It does resize itself and center itself just like a real message box.

Included with this .bas module is a sample application that uses it and illustrates how it works.


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