Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

MsgBox in VB6

Status
Not open for further replies.

bubulindo

Electrical
Jun 3, 2003
34
Hello,

I would like to know if it's possible to take off the alert sound that a msgbox makes in VB???



Best regards, Carlos Cardoso
 
Replies continue below

Recommended for you

Not without various hacks, as far as I know - it's a user setting. Using your own (custom) dialog box is the cleanest way around it.
 
If you want you could use this code below do it, however the message box will be a Question message box. The Question message box will not make the alert sound.

Heres the code:

prompt$ = "Put Message here"
reply = MsgBox(prompt$, vbQuestion, "Put title here")

Justin Dean,PE

 
The alert sound is not a vb option, is a windows option that is on the control panel and sounds and multimedia, could be the question sound "chord.wav" that logically is on the registry

There's a key on the registry where you can find out about the sounds

HKEY_CURRENT_USER\Schemes\Apps\.Default

And in there most likely is the following the one that controls that sound:

HKEY_CURRENT_USER\Schemes\Apps\.Default\SystemQuestion\.Current

you can modify it on and off every time that you use your application. Well, is just and idea.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor