Z
Zytan
I want to set a control in a form to have the default focus.
This is not the accept button -- that's set to a button when is
'clicked' when you press ENTER. I want a textbox to have the focus
when the form is loaded. The textbox cannot be the first in the Tab
order, since it's not at the top of the window, and it seems silly to
start the tab order at it just to fix this issue. I cannot call
control.Focus() from Form1_Load() since doesn't work, even though the
form claims to be visible at this time. I also cannot give it focus
from Form1_Activated(), either. In both cases control.CanFocus() is
False.
Why is this so difficult? It seems the form should have a
DefaultControl method along with its AcceptButton and CancelButton
methods.
Any help / suggestions are appreciated.
Zytan.
This is not the accept button -- that's set to a button when is
'clicked' when you press ENTER. I want a textbox to have the focus
when the form is loaded. The textbox cannot be the first in the Tab
order, since it's not at the top of the window, and it seems silly to
start the tab order at it just to fix this issue. I cannot call
control.Focus() from Form1_Load() since doesn't work, even though the
form claims to be visible at this time. I also cannot give it focus
from Form1_Activated(), either. In both cases control.CanFocus() is
False.
Why is this so difficult? It seems the form should have a
DefaultControl method along with its AcceptButton and CancelButton
methods.
Any help / suggestions are appreciated.
Zytan.