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();
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 ,...
-
MVC is awesome. I love the nice and clean HTML output, and the nice separation of concerns!! Not to mention how easy we can test the co...
-
It's easy I thought, just select the Property of the EntityType and set the Default Value in the Properties window to: DateTime.Now ...

No comments:
Post a Comment