Results 1 to 5 of 5

Thread: EASY<EASY<EASY!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    148
    Howdy!

    OK an easy question

    I have two text boxes on a form
    Text1
    Text2

    if i write something in text1 then press enter to set the focus to Text2 I get a BEEP!
    If I use the TAB key I get no beep, But If I use sendKeys Command for the TAB button, I get the BEEP again.

    HOW DO I STOP ALL BEEPING IN MY PROJECT (vb6.0)
    THANX





  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    1: create a command button with visible = false and default = true. write no code in its click event. this will eradicate beeping.

    2: use SetFocus instead of SendKeys to set focus on your textbox.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    148
    2. I tried setfocus before and it didn't help
    I'll try your first suggestion.
    Thanx

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    set the text boxes to multiline and:


    Code:
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
      KeyAscii = 0 'ignore the keypress
      Text2.SetFocus
    End If
    
    End Sub
    Mark
    -------------------

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    148
    It Works Thanx

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