Solved

Default button

Posted on 2004-08-23
2
210 Views
Last Modified: 2012-05-05

I've got an OK and Cancel button on my VB.NET form and I want my OK button to be the default pushbutton, i.e. press <enter> to accept. I'm sure this one is staring me in the face but I cannot seem to find where I make a button the default.

0
Comment
Question by:bfeddish
  • 2
2 Comments
 
LVL 14

Accepted Solution

by:
ptakja earned 125 total points
ID: 11871520
On your form, set the AcceptButton property to the name of your OK button.
0
 
LVL 14

Expert Comment

by:ptakja
ID: 11871541
There is also a CancelButton property that will trigger the Cancel button click_event to fire when the user closes the window using the Close Window icon (or I think presses the ESC key).
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now