.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> System Process >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Generate Beep

Posted By:Pankaj Mishra       Posted Date: August 16, 2008    Points: 10    Category: System Process    URL: http://www.dotnetspark.com  
 

Hi,

  Below is the code to generate beep/ Meesage sound in C#.This might helpful when user entering wrong value then you can generate beep sound to alert user.

public class MyBeep
{

[DllImport("Kernel32.dll")]
public static extern bool Beep(UInt32 frequency, UInt32 duration);

       public static void BeepMe()
        {
                Beep(500, 200);
        }

}

Cheers
Pankaj
 


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend