How to: Automating the InvokeRequired code pattern
How to: Automating the InvokeRequired code pattern
Automating the InvokeRequired code pattern
I have become painfully aware of just how often one needs to write the following code pattern in event-driven GUI code, where
private void DoGUISwitch() { // cruisin for a bruisin' through exception city object1.Visible = true; object2.Visible = false; }
becomes:
private void DoGUISwitch() { if (object1.InvokeRequired) { object1.Invoke(new…
View On WordPress











