Why Console.Beep() doen't beep?
Asked By Rafae
09-Feb-08 11:07 PM
I'm studying C# (I've been a VB developer).
I'm making some tests and I need to use Console.Beep(), but it doesn't make
any sound, no matter if I try it in VS2008 beta or VS2005.
Could anybody tell my some hint abouit it?
--
Rafael
Rafael,There is not any difference in using classes from Net between Visual
Asked By Cor Ligthert[MVP]
10-Feb-08 01:27 AM
Rafael,
There is not any difference in using classes from Net between Visual Basic
and C#.
The only difference is the program language around that.
So probably there is something else.
Cor
I don't know why it doesn't beep,you might try this function
Asked By Sergey Zyuzin
10-Feb-08 10:43 AM
I don't know why it doesn't beep,
you might try this function instead:
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]
public static extern bool MessageBeep(int type);
HTH,
Sergey Zyuzin
Hi Rafael,As I stated, Beep uses the PC Speaker, which is attached to the
Asked By Mick Doherty
11-Feb-08 05:19 AM
Hi Rafael,
As I stated, Beep uses the PC Speaker, which is attached to the motherboard
(mainboard),
whereas, MessageBeep plays a wave sound through the soundcard. So
Console.Beep() will only sound if you have a PC Speaker attached to the
motherboard.
If you have a PC Speaker then it may have been disabled.
http://www.computerhope.com/issues/ch000725.htm
--
Mick Doherty
http://www.dotnetrix.co.uk/nothing.html