Beep

  • Thread starter Thread starter Ricardo
  • Start date Start date
Ricardo said:
how can I make a beep on the speakers??? I found it in vb but not in
c#...

Either reference the "Microsoft.VisualBasic.dll" assembly and call it there
"Microsoft.VisualBasic.Beep"

or use PInvoke in C#:

[DllImport("user32.dll")]
public static extern bool MessageBeep(int beepType);


And call it with: MessageBeep(-1);


See also: Using Win32 and Other Libraries
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dncscol/html/csharp09192002.asp

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Back
Top