You could :
- configure the tooltip so that it is displayed automatically when hovering
the control if applicable
- if you want to display explicitely the tool tip, you can use whatever
Invoke method is available. AFAIK having Invoke on all controls is a
convenience to avoid going always to the parent form but calling invoke on
any control that belongs to the form (or the Form.Invoke method) will always
call on the same UI thread...
--
Patrice
"Thijs" <thijs.brilleman@gmail.coma écrit dans le message de news:
ab17e785-9e8f-4bf9-a83c-d3bf526c46e5...oglegroups.com...
Hello everybody,
Iīve got a problem thatīs slightly complicated (at least to me it
seems) so I will try to state it as clearly as possible.
At a certain point in time, I start a second thread that runs one of
my functions. The function in this second raises events. As you might
know, the eventhandler for this event is executed within this second
thread and not within the first. Itīs not possible to update
properties of a user control (like a label) that was created in the
first thread, from a second thread. Now .NET has this neat little
invoke() method on their controls, so that you can still use delegates
to update these controls.
So far so good.
However, I run into problems with one special object: a ToolTip
instance. I want the eventhandler, executed by the second thread, to
display a tooltip. However, there is no invoke() method on the
tooltip, and that makes invoking it quite hard. Calling it directly
doesnīt work either.
Does anyone have a solution for this so that I can still show this
tooltip?
Kind regards,
Thijs Brilleman