G
Gilbert Tordeur
How can I set the focus on a specified control in a Windows form ?
Thank you.
Gilbert
Thank you.
Gilbert
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Matt S said:Simply:
[Control Name].Select
e.g. TextBox1.Select
Hope this helps.
Gilbert Tordeur said:How can I set the focus on a specified control in a Windows form ?
Thank you.
Gilbert
* "Gilbert Tordeur said:How can I set the focus on a specified control in a Windows form ?
Herfried K. Wagner said:In addition to the other replies: Notice that the focus can only be set
to a visible and enabled control.

Cor Ligthert said:Ricky,
Until now I did not know this problem, however a lot of people are just
calling the sub.
The performclick does something as
button1_click(nothing,nothing)
* "Ricky W. Hunt said:Ugh! This is SO important. I wasted a whole day not being able to figure out
why button1.PerformClick() wasn't working. Turns out it will only work IF
the button is enabled. BTW, is there a way to execute the sub if the button
IS NOT enabled? It's no big deal to check it's status, enable it if off, and
disable it again later (well, it is kind of a pain) but it would be nice to
be able to override it without worrying about it's status and making sure
it's returned to it's previous state.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.