Hi,
When I tried Console.Beep()
on Win Vista (64bit), it just does not work. The speaker itself is OK, when the PC starts, it beeps.
Any advice? Thanks!
views:
268answers:
5Hi there,
the Beep method is not supported on Vista/XP x64. I suppose you do have 64-bit OS?
How did you conclude/determine that Vista was the cause of the problem? That is relevant information in this question.
Is it 64 bit Vista?
Console.Beep calls the API function Beep which isn't supported on 64bit Vista.
Quote: Windows Vista x64 and Windows XP 64-Bit Edition: This function is not supported.
You might be able to use MessageBeep instead if it's ok with the beep coming through the speakers instead of straight from the motherboard. See here for how to call this from C#.
As others have suggested, the Console.Beep()
does not work on 64 bit windows as the documentation states. Instead, you can use the following statement that issues a beep (but not through the Beep API):
// beep
System.Media.SystemSounds.Beep.Play();
Workaround originally found here at MSDN Connect.
As everyone else has posted pc speaker Beep is not supported in 64x of windows vista or XP and not at all in windows 7. Here is a blog posting from Microsoft explaining why