Determines whether or not event-handlers will be run on the GUI thread if one is available.
The UseGuiThreadIfAvailable
flag determines whether or not event-handlers will be run on the GUI thread if one is available. If the flag is true
(the default) then they will be run on the GUI thread if one is available (only for Windows Forms applications). If the flag is false
then they will be run on a worker-thread.
It is important to note that if event-handlers are run on a worker-thread then Windows Forms related operations will usually fail. Since such operations are commonly used in event-handlers, the default is true
.