How do I invoke System Beep in Windows Forms?

  • Thread starter Thread starter Guest
  • Start date Start date
have a look at PInvoke.net and use the win32 Beep function

else import the microsoft.vb namespace there is a function in there somewhere,
if u can't find it let me know and i'll search it out for you.
 
This is obvious missing in C#.NET, why??
So much for managed code...

This works, but is not managed code:

[DllImport("user32.dll")]
private static extern bool MessageBeep(int uType);

MessageBeep(-1);
 
Or...

Add References: Microsoft.VisualBasic

Microsoft.VisualBasic.Interaction.Beep();


Seems they forgot the beep i C#?
 
Back
Top