posted 06-16-2008 10:54 PM
To solve a problem with a tooltip displaying eratically, when moving the mouse quickly, you can change the ToolTips timing.Here is a subroutine to set the timing. All you need is the tooltips handle.
code:
SUB SetToolTipTime(BYVAL hTTip&, BYVAL TI%, BYVAL TA%, BYVAL TR%)
SendMessage hTTip&, &H403, 1, MAKLNG(TR%,0) ' reshow
SendMessage hTTip&, &H403, 2, MAKLNG(TA%,0) ' autopop
SendMessage hTTip&, &H403, 3, MAKLNG(TI%,0) ' initial
END SUB
The parameters:
TI% - Initial Time needed to display tooltip when mouse is stationary
TA% - Time tooltip stays visible when mouse staionary
TR% - Time before tooltip reshows in another control
The times are in milliseconds.
The defaults are:
TI% - 500 ms
TA% - 5000 ms
TR% - 100 ms
You can solve some timing problems by making the TR% value higher.
ie.
SetToolTipTime hForm1_ToolTip&, 500, 5000, 500