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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Controls.Focus() while a window is opened

Status
Not open for further replies.

xai999

Programmer
Apr 7, 2005
24
0
0
NL
In a windows application I open a form on top of the application, to allow for some input. Normaly I want the focus to be on the first control, so I put the tabindex on that control to 0 and number up from there.
In one particular situation I want to focus on another control in the form. I tried simply calling the Focus method for that control, but it doesn't work.
I tried calling focus in the form_load event and in the visibilitychanged event of the control (in case it wasn't visible when focus was requested).
Can anyone tell me how to get focus to a control?

And then silence smacks right in there...
... And it is loud!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top