B
Bill McCormick
Hello,
A timer control (I think) runs in another thread apart from a main form.
In the OnTick event, you can update some form control with no worries.
I'm making an AsyncronousServer class that runs in a separate thread and
I'd like to have server generated events (OnListen, OnConnect, OnSend,
OnRecieve, and so on) update a form control.
The only way I can figure out how to do this is to check InvokeRequired
and use Invoke on the form control from the event handler.
Is this the best way to do this? How does the timer control do this?
Cheers,
Bill
A timer control (I think) runs in another thread apart from a main form.
In the OnTick event, you can update some form control with no worries.
I'm making an AsyncronousServer class that runs in a separate thread and
I'd like to have server generated events (OnListen, OnConnect, OnSend,
OnRecieve, and so on) update a form control.
The only way I can figure out how to do this is to check InvokeRequired
and use Invoke on the form control from the event handler.
Is this the best way to do this? How does the timer control do this?
Cheers,
Bill