Results 1 to 6 of 6

Thread: get 'ping'-sound

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    Netherlands, Europe
    Posts
    14

    get 'ping'-sound

    I've made a program and if I want to change the focus from text1 to text 2 I do this:
    --------------------
    Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
    Text2.SetFocus
    End If
    End Sub
    --------------------
    but when I press the enter key, I get a 'ping'-sound.
    how can I make this disappear?

    martijn

  2. #2
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    Check your system sound settings. VB doesn't do this by itself, but perhaps you have a sound event set up which is raised in this instance.
    Do you have a sound set up for all options in the sound menu?
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    Netherlands, Europe
    Posts
    14
    I know why the sound commes but I hoped that I could make it disappear in the program without removing it from the sounds menu.

    thanx for your reply anyway!

    martijn

  4. #4
    Addicted Member flavorjatin's Avatar
    Join Date
    Sep 2001
    Location
    India
    Posts
    154
    if u wanna do it programatically then these 2 APIs must be of some help - GetLocaleInfo and SetLocaleInfo.

    I've not tried this but I've changed date settings programatically through these API's. You may try further.

    Bye.
    Best Regards.

  5. #5
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796
    Just change your code to this and it should work. (NB It's in a different event.)

    VB Code:
    1. Private Sub Text1_KeyPress(KeyAscii As Integer)
    2.   If KeyAscii = 13 Then
    3.     KeyAscii = 0
    4.     Text2.SetFocus
    5.   End If
    6. End Sub
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    Netherlands, Europe
    Posts
    14
    I'll try it!

    martijn

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