How to set focus to a comboBox on a form?

Posted on 2007-08-08
Medium Priority
Last Modified: 2013-11-05
Hi, I'm using .net 2 for windows application.  How to set focus to a comboBox on a form?  On this form on the right I have a tree and on the left I have a couple of comboBox and a couple of textboxes.  How can I set focus to one of the comboBox when the form is loaded initially?  Currently, the focus is on the root node of the tree.  In the formload, I have put comboBox.Focus(); as the last line of code but it's still not working.  thank you.
Question by:lapucca
LVL 70

Accepted Solution

Éric Moreau earned 2000 total points
ID: 19658258
try to put your line (comboBox.Focus(); ) into the Activate event

Author Comment

ID: 19658526
Worked great!  Thank you.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

862 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