Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Focusing a field on a form load and default button

Status
Not open for further replies.

thadley

IS-IT--Management
Aug 19, 2002
5
US
Hello,

Well I am making my way through DB connections and the other variety of processes that VB.NET allow, but I have run into two issues that I cannot find in any book. I know that you use a focus method to place the cursor into a text field, but this isn't working under a onLoad function. Are there any tricks to this? Also, does anyone know what command you use to change a button to the default button that is pressed when the user presses the "Enter" key after entering some data in a text field?

Thank you very much in advance for the information.

Thom
 
Don't know about question 1.
The form has two properties: AcceptButton and CancelButton. Set AcceptButton to activate when the Enter key is pressed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top