Skip to main content
gamedev.net
🔒 Locked

VB 5.0 Focus problems...

Started by Zz Jul 10, 2000 at 11:56 PM 2 replies 200+ views
Original Post
Zz
Zz
ok user clicks a button and text1.text appears how do I get the focus to automatically move to text box (Cursor blinking waiting for input...)? there is no focus property. Thanks -- Zz
Latn
Latn
Try Text.SetFocus
I may be wrong, its been a while since I''ve used VB
win32mfc
win32mfc
He''s right. Text1.SetFocus will do it.

I forget if VB 5.0 or VB 6.0 introduced it, but there is also a Validation event you can work on. It helps you validate a field''s value BEFORE it _loses_ focus.. So you can "keep" the cursor in a text field until it recieves a valid input value.

// CHRIS
// CHRIS [win32mfc]
TPH
TPH
The Validation event was added for the 6.0 release of VB.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.