Results 1 to 5 of 5

Thread: What is the beep code for an error?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    South Charleston, WV, USA
    Posts
    607

    What is the beep code for an error?

    The following code produces a sound that's like a tone or a soft bell, indicating that an action has completed successfully:

    Code:
    System.Media.SystemSounds.Beep.Play()
    Can anyone provide the code for the opposite? You know like if you tried to do something in Windows that was invalid. Is there some kind of default sound indicating an error that I can invoke on a Windows computer in VB.Net similar to the one above only discordant?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: What is the beep code for an error?

    Some questions just don't need asking. The SystemSounds class only has four other properties besides Beep. Why can't you just Play each one to determine which one you need? If your first instinct is to ask others to tell you something that you could work out for yourself in about 30 seconds, you're never going to make it as a developer.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2004
    Location
    South Charleston, WV, USA
    Posts
    607

    Re: What is the beep code for an error?

    Can anyone help me?

  4. #4
    Hyperactive Member Ram2Curious's Avatar
    Join Date
    Apr 2010
    Posts
    484

    Re: What is the beep code for an error?

    jmc was talking about this :

    vb.net Code:
    1. System.Media.SystemSounds.Hand.Play()

  5. #5
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: What is the beep code for an error?

    The SystemSounds aren't necessarily those infuriating noises provided by Microsoft. Each user can set their own samples for the system sounds in the control panel (WinXP); or nothing at all. Come to think of it, I'd like to turn all my sounds into birdsong: a nightingale for a beep, a vulture for a critical stop and so on... If you want to play your own samples from your program instead of the system sounds, use My.Computer.Audio.Play(wavefile). But I hope I don't have to use that program.

    BB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width