Windows Forms FAQ

Ever wanted to know how to make the PC “beep” (the windows 2000 default is the “ding” sound), check out the Windows Forms FAQ.  Odd that, I just noticed that its a .ASP page, not a .ASPX – but then I guess its a Windows FORMS FAQ, and not an ASP.Net faq.


For those who don’t have time to look up the solution to the “beep” problem, here are the two solutions from the FAQ:

1.
     using System.Runtime.InteropServices;

[DllImport(“user32.dll”)]
public static extern int MessageBeep(uint n);
private void button2_Click(object sender, System.EventArgs e)
{
MessageBeep(0x0);
}

2.
     Reference the VB.NET runtime support and just use the Beep() method.
The method is in:
Microsoft.Visual Basic.NET Runtime
The method is:
Microsoft.VisualBasic.Interaction.Beep();

Leave a Reply

Your email address will not be published. Required fields are marked *