C # - Console.Beep does not work on Windows Vista

When I tried Console.Beep() on Win Vista (64 bit), it just didn't work. The speaker itself is in order, when the computer starts up, it beeps. Any advice? Thanks!

+6
c # console-application
source share
4 answers

Is it 64 bit Vista?

Console.Beep calls the Beep API function, which is not supported on 64-bit Vista.

Quote: Windows Vista x64 and Windows XP 64-bit: This feature is not supported.

You might be able to use MessageBeep if this is normal when the audio signal comes through the speakers and not directly from the motherboard. See here for calling this from C #.

+10
source share

The Beep method is not supported on Vista / XP x64. I assume you have a 64-bit OS?

+2
source share

Like everyone else placed a PC speaker. The audio signal is not supported in a 64-fold window of Windows Vista or XP, and not at all in Windows 7. Here is a blog post from Microsoft explaining why

http://blogs.msdn.com/b/larryosterman/archive/2010/01/04/what-s-up-with-the-beep-driver-in-windows-7.aspx

+2
source share

As others have shown, Console.Beep() does not work on 64-bit windows, as the documentation says . Instead, you can use the following statement that emits a beep (but not through the Beep API):

 // beep System.Media.SystemSounds.Beep.Play(); 

A workaround was originally found here at MSDN Connect .

+1
source share

All Articles