textbox got focus on form load

Lifeseeker

Registered User.
Local time
Today, 15:20
Joined
Mar 18, 2011
Messages
273
Hi,

I've noticed that when a form is opened, the cursor is always focused on the first field.

I would like to have a safety measure in check, which prevents form hitting the "ESC" button and accidently deletes what's in the textbox.

is there any way to set it so that when the form loads, no field has the cursor focus until the user actually clicks on a field?

I'm thinking this is an got focus for the textbox in the form load event, but I'm not sure how the syntax should go.

comments/thoughts much appreciated.
 
Put a very tiny unbound text box on your form (width - .001" and height - .001") and then put that as the first item in the form's tab order. Then that will get the focus instead of any visible controls.
 
Put a very tiny unbound text box on your form (width - .001" and height - .001") and then put that as the first item in the form's tab order. Then that will get the focus instead of any visible controls.

Thank you Bob it gives me exactly what I wanted.
 

Users who are viewing this thread

Back
Top Bottom