|
-
Oct 3rd, 2000, 08:06 AM
#1
Thread Starter
Addicted Member
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
-
Oct 3rd, 2000, 08:40 AM
#2
Frenzied Member
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.
-
Oct 3rd, 2000, 09:05 AM
#3
Thread Starter
Addicted Member
2. I tried setfocus before and it didn't help
I'll try your first suggestion.
Thanx
-
Oct 3rd, 2000, 09:30 AM
#4
Frenzied Member
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
-
Oct 3rd, 2000, 09:59 AM
#5
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|