O'Reilly logo

Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition by Harvey M. Deitel - Deitel & Associates, Inc., Paul J. Deitel - Deitel & Associates, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

15.9. Multithreading with GUIs

The nature of multithreaded programming prevents you from knowing exactly when a thread will execute. GUI controls are not thread safe—if multiple threads manipulate a control, the results may not be correct. To ensure that threads manipulate controls in a thread-safe manner, all interactions with them should be performed by the User Interface thread (also known as the UI thread)—the thread that creates and maintains the GUI. Class Control provides method Invoke to help with this process. Method Invoke specifies GUI processing statements that the UI thread should execute. The method receives as its arguments a Delegate representing a method that will modify the GUI and an optional array of objects representing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required