Ken Perregaux
April 5th, 1999, 01:34 PM
How can I turn off the sounds when a Message Box is displayed?
|
Click to See Complete Forum and Search --> : Q: Is there a way to turn off sounds when using Message Boxes? Ken Perregaux April 5th, 1999, 01:34 PM How can I turn off the sounds when a Message Box is displayed? Daniel Levine April 5th, 1999, 01:38 PM Hi, I don't know if there is a way to do this programatically (although you could probably use the registry functions if you found the right keys) but the sounds played when a message box is displayed are defined in the "Sounds" Control Panel applet. (eg. When a question message box pops up, the "Question" sounds is played.) Daniel. Ken Perregaux April 5th, 1999, 01:44 PM Thanks for the quick response Daniel but I was hoping for a programmatical answer! Daniel Levine April 5th, 1999, 01:58 PM Hi, to turn off the sounds programatically, you have to use the registry functions to change the values in the key: HKEY_CURRENT_USER\AppEvents\Schemes\Apps The keys under that key have the names of the sound files to play. You can overwrite them or delete them as required. The key for the standard beep is (I think): HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default You can find the others as you need them. I hope this helps. Daniel. Gomez Addams April 5th, 1999, 09:38 PM Personally, I would consider it very inappropriate if an application disabled the sound settings I have chosen. If you want to do it for your app that's one thing. If you disable them for all apps that's entirely another. There is an MSDN sample called msgcolor that allows one to customize a message box's appearance. It might also allow you to customize the sound. Another option is to just implement your own MessageBox dialog. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |