
different Focus behaviour between Standard and User controls
I have an MDI form with a toolbar and an MDI child form which contains a
TextBox, a selfmade user control and a command button (with no
functionality).
The selfmade user control contains only a TextBox as its constituent
control and publishes essentially only the Text property of the
constituent control.
In the toolbar there is a button which sets the focus to "Me.ActiveForm"
on its Click event.
When I click into the TextBox and then on the toolbar button, the
TextBox catches a LostFocus event. The focus is at once returned to the
TextBox and when I now click on the command button on the child form,
the TextBox catches another LostFocus event. Everything as expected so
far.
Now I repeat the experiment with the selfmade user control, and the
behaviour is different:
I click into the SpecialText control and then on the toolbar button. The
SpecialText catches a LostFocus event. OK. The focus is returned to the
SpecialText (at least visually) and when I now click on the co
Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.