Results 1 to 6 of 6

Thread: How do I Turn off and on default sounds?

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Location
    Winston-Salem, NC
    Posts
    1
    I have coded a Keypress event that allows the user to press
    the enter key rather than the tab key to move to the next
    textbox. The cursor moves to the next textbox and the previous input is displayed in a picturebox--but I still
    get the default sound which makes the user think they have
    made an error. How do I manipulate sounds? I have asked my
    instructor and he gave me 2 books to look for an answer, but neither of them address this (or at least I couldn't find anything). Help, please!

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    is this what you need:

    Code:
    Beep
    that creates the WINDOWS beep sound (the sound that comes along with a message box)
    NXSupport - Your one-stop source for computer help

  3. #3
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    258
    Do you want to remove the beep or play a sound ?
    Visual Basic 6 SP4 on win98se

    QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!

  4. #4
    Addicted Member
    Join Date
    May 2000
    Location
    Westminster, Md.
    Posts
    163

    Keypress beep

    That beep is caused during the keypress because the KeyAscii value creates a beep automatically if it isn't set to 0 or NULL before the end of your sub.

    I tried something similar and it drove me nuts too. I dont remember where I found that out, but if you use


    KeyAscii=0

    before the end of your sub you'll be fine.


    Eiredrake

  5. #5
    Hyperactive Member squakMix's Avatar
    Join Date
    Oct 2003
    Location
    Washington
    Posts
    342
    Does this work If you didnt Use ascii to control the keys?
    -squaK

  6. #6
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    Yeah, it will work....

    VB Code:
    1. If KeyAscii = 13 Then
    2.    KeyAscii = 0
    3.    
    4.        OtherStuff("What", "Ever", "Else")
    5. End If

    That should make it go no Beepy.

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