B
Ben Voigt
Ok, I keep getting an exception:
A first chance exception of type 'System.InvalidOperationException' occurred
in System.Windows.Forms.dll
Additional information: Invoke or BeginInvoke cannot be called on a control
until the window handle has been created.
However, I already called CreateControl on the Control in question:
ThreadSync.invoker = new Form();
ThreadSync.invoker.CreateControl();
What can I do to make this work properly? I don't want to make the Control
visible, but it seems that no window is created unless the control is made
visible. Is there another method besides Control.Invoke that I can use to
run an eventhandler to my main thread?
A first chance exception of type 'System.InvalidOperationException' occurred
in System.Windows.Forms.dll
Additional information: Invoke or BeginInvoke cannot be called on a control
until the window handle has been created.
However, I already called CreateControl on the Control in question:
ThreadSync.invoker = new Form();
ThreadSync.invoker.CreateControl();
What can I do to make this work properly? I don't want to make the Control
visible, but it seems that no window is created unless the control is made
visible. Is there another method besides Control.Invoke that I can use to
run an eventhandler to my main thread?