Application.DoEvents();
Wieso wird der Focus nicht sofort auf meine TextBox gesetzt?
Da ich gerade einen andere EventHandler ausführe, warten die anderen noch...
Mit Application.DoEvents() werden die anderen Events abgehandelt.
// Focus auf 1. TextBox setzen
textBox24.Focus();
Application.DoEvents();
...
aus MSDN:
Each time the form handles an event, it processes all the code associated with that event. All other events wait in the queue.
Application.DoEvents();
Latest Posts
Popular Posts
-
I am *very* keen on automating tests, so I was looking into unit testing a WCF service. If I say "unit test", I mean a fast ,...
-
It's easy I thought, just select the Property of the EntityType and set the Default Value in the Properties window to: DateTime.Now ...
-
*Updated* 26. September 2010: Updated with comments from Adam Cogan *Updated* 27. September 2010: Updated the comparison between anonymo...
No comments:
Post a Comment