Beep sound when error occurs using C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ramya naidu
    New Member
    • Sep 2007
    • 10

    Beep sound when error occurs using C#

    Hai iam working on a project were i have some textboxes in that one textbox should allow only digits from 0 to 360 and for that i have a error provider when i enter 361 the error provider blinks i need a beep sound when that error provider blinks how can i get this beep sound plz any one help me in this
  • CyberSoftHari
    Recognized Expert Contributor
    • Sep 2007
    • 488

    #2
    [CODE=cpp][DllImport("core dll.dll")]
    public static extern int PlaySound(
    string szSound,
    IntPtr hModule,
    int flags);[/CODE]
    you can import the above dll to play beep. What version of .Net version you are using.

    Comment

    • ramya naidu
      New Member
      • Sep 2007
      • 10

      #3
      Iam not using .net iam using visual studio c# express so can u help me plz

      Comment

      • CyberSoftHari
        Recognized Expert Contributor
        • Sep 2007
        • 488

        #4
        I think you are not good in basics.

        [CODE=cpp][DllImport("kern el32.dll")]
        public static extern bool Beep(int freq,int duration);[/CODE]

        Comment

        Working...