C
Christian Schwarz
Hello,
I've a form containing two Labels, two TextBoxes and a button. The form is
created only once. Every time it's needed it's showed using ShowDialog() and
afterwards closed using Close() method. Before showing the form the focus is
set on one of the two TextBoxes. When showing the form for the very first
time, Focus() method works well. But the next time the TextBox doesn't get
the focus. Although Focus() returns true, the Focused property returns false
....
First, I thaught that setting the focus on the control *before* the form is
actually shown is the problem. But even using the form's Load event to set
the focus doesn't work.
Does anybody have an idea by what this problem is caused ?
Greetings, Christian
I've a form containing two Labels, two TextBoxes and a button. The form is
created only once. Every time it's needed it's showed using ShowDialog() and
afterwards closed using Close() method. Before showing the form the focus is
set on one of the two TextBoxes. When showing the form for the very first
time, Focus() method works well. But the next time the TextBox doesn't get
the focus. Although Focus() returns true, the Focused property returns false
....
First, I thaught that setting the focus on the control *before* the form is
actually shown is the problem. But even using the form's Load event to set
the focus doesn't work.
Does anybody have an idea by what this problem is caused ?
Greetings, Christian