DH
> What is the place of OnIdle when using Threads ?
OnIdle will only be called when the UI's message loop is idle. What
happens in threads is totally irrelevant and ignored.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Is it correct to define one AppEvents within each PaintBox I will use (the
idle event will be there to handle mouse hold...and keyboard state and input
when the PaintBox is under the mouse) ?
Or better do only one instance managing it all ?
DH
"Marc Rohloff [TeamB]" <ma...@nospam.marcrohloff.com> a écrit dans le message
de news:1cb6pbcmbwn3$.dlg@dlg.marcrohloff.com...
> What is the place of OnIdle when using Threads ?
The two have no connection whatsoever.
--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
Or should I take care of it ?
DH
> Does it means the OnIdle never occurs while a Thread is running ?
No it means that OnIdle happens only in the MainThread when there are
no messages to be processed. Other threads have nothing to do with it,
they run independently.
> Or should I take care of it ?
Nope.
--
Pieter
DH
>> You could. But I am sure there are better ways to do this than using
> an OnIdle event.
Do you want me to lean on a Timer ?
DH
> OnIdle takes TComponent in its constructor....
OnIdle is an event and has no constructor.
> Is it correct to define one AppEvents within each PaintBox I will use (the
> idle event will be there to handle mouse hold...and keyboard state and input
> when the PaintBox is under the mouse) ?
You could. But I am sure there are better ways to do this than using
an OnIdle event.
--