Home All Groups Group Topic Archive Search About

How can I reduce the initial ToolTip delay in VB6?

Author
10 Sep 2010 10:15 AM
MM
I've read up on TTM_SETDELAYTIME, but this appears to relate to a
newly created tooltip. How can I change the Windows default tooltip's
initial delay from 500ms to, say, 10ms? I want one particular tooltip
(on my virtual piano keys) to appear as instantaneously as possible.

(I could, of course, create my own tooltip popup, but if it's possible
to affect the standard tooltip initial delay I might as well use that,
since it is fine in all other respects.)

MM

Author
10 Sep 2010 11:54 AM
Nobody
"MM" <kylix***@yahoo.co.uk> wrote in message
news:621k86l47j1n223k37cce9g64q287jqrgh@4ax.com...
> I've read up on TTM_SETDELAYTIME, but this appears to relate to a
> newly created tooltip. How can I change the Windows default tooltip's
> initial delay from 500ms to, say, 10ms? I want one particular tooltip
> (on my virtual piano keys) to appear as instantaneously as possible.
>
> (I could, of course, create my own tooltip popup, but if it's possible
> to affect the standard tooltip initial delay I might as well use that,
> since it is fine in all other respects.)

I think VB tooltip is not using the common control tooltip, otherwise every
EXE made with VB would have a dependency on the common controls DLL.
However, it's possible that Microsoft compiled the tooltip control
statically into the VB runtime. Also, by using Spy++ with a form with two
buttons, VB tooltip window handle remains the same for each tooltip. The
window class is "VBBubble", so you might be able to use some of that
information to get what you want.
Author
10 Sep 2010 4:36 PM
MM
Show quote Hide quote
On Fri, 10 Sep 2010 07:54:34 -0400, "Nobody" <nob***@nobody.com>
wrote:

>"MM" <kylix***@yahoo.co.uk> wrote in message
>news:621k86l47j1n223k37cce9g64q287jqrgh@4ax.com...
>> I've read up on TTM_SETDELAYTIME, but this appears to relate to a
>> newly created tooltip. How can I change the Windows default tooltip's
>> initial delay from 500ms to, say, 10ms? I want one particular tooltip
>> (on my virtual piano keys) to appear as instantaneously as possible.
>>
>> (I could, of course, create my own tooltip popup, but if it's possible
>> to affect the standard tooltip initial delay I might as well use that,
>> since it is fine in all other respects.)
>
>I think VB tooltip is not using the common control tooltip, otherwise every
>EXE made with VB would have a dependency on the common controls DLL.
>However, it's possible that Microsoft compiled the tooltip control
>statically into the VB runtime. Also, by using Spy++ with a form with two
>buttons, VB tooltip window handle remains the same for each tooltip. The
>window class is "VBBubble", so you might be able to use some of that
>information to get what you want.

Google produced several hits for VBBubble, but also this:
http://btmtz.mvps.org/tooltip/

I quickly modified the demo code to add a call to change the initial
delay and bingo! The delay is now 5ms. The tooltip pops up
instantaneously.  However, this is creating a new tool tip, not the
VBBubble one, so I'll research this a bit further in case I find
something more on VBBubble, else I'll just use Brad Martinez's
solution.

Many thanks for the pointers!

MM
Author
10 Sep 2010 5:27 PM
Kevin Provance
"Nobody" <nob***@nobody.com> wrote in message
news:i6d69s$qr2$1@speranza.aioe.org...
: I think VB tooltip is not using the common control tooltip, otherwise
every
: EXE made with VB would have a dependency on the common controls DLL.

So?  That particular DLL is part of the Windows OS.
Author
10 Sep 2010 7:48 PM
MM
On Fri, 10 Sep 2010 13:27:38 -0400, "Kevin Provance" <k@p.c> wrote:

>
>"Nobody" <nob***@nobody.com> wrote in message
>news:i6d69s$qr2$1@speranza.aioe.org...
>: I think VB tooltip is not using the common control tooltip, otherwise
>every
>: EXE made with VB would have a dependency on the common controls DLL.
>
>So?  That particular DLL is part of the Windows OS.

While it is fairly straightforward to create one's own tooltip, which
I've since done using Brad Martinez's tooltip example, it would be a
lot easier simply to call a Windows API to reset the initial display
for the inbuilt VBBubble tooltip. That 500ms initial delay must exist
SOMEwhere in the OS, but where? It'll almost certainly be a Long.

MM
Author
10 Sep 2010 8:17 PM
J.C.
You can send a TTM_SETDELAYTIME to set the delay.

SendMessage Handle, TTM_SETDELAYTIME, TTDT_AUTOPOP, 300

>That 500ms initial delay must exist
> SOMEwhere in the OS, but where?

That place is the registry.

Show quoteHide quote
"MM" <kylix***@yahoo.co.uk> wrote in message
news:ao2l86dgeoj7ga4jq5c65gqr3a6of59lv6@4ax.com...
> On Fri, 10 Sep 2010 13:27:38 -0400, "Kevin Provance" <k@p.c> wrote:
>
>>
>>"Nobody" <nob***@nobody.com> wrote in message
>>news:i6d69s$qr2$1@speranza.aioe.org...
>>: I think VB tooltip is not using the common control tooltip, otherwise
>>every
>>: EXE made with VB would have a dependency on the common controls DLL.
>>
>>So?  That particular DLL is part of the Windows OS.
>
> While it is fairly straightforward to create one's own tooltip, which
> I've since done using Brad Martinez's tooltip example, it would be a
> lot easier simply to call a Windows API to reset the initial display
> for the inbuilt VBBubble tooltip. That 500ms initial delay must exist
> SOMEwhere in the OS, but where? It'll almost certainly be a Long.
>
> MM
Author
11 Sep 2010 7:08 AM
MM
On Fri, 10 Sep 2010 15:17:26 -0500, "J.C." <y***@nothanks.com> wrote:

>You can send a TTM_SETDELAYTIME to set the delay.
>
>SendMessage Handle, TTM_SETDELAYTIME, TTDT_AUTOPOP, 300
>
>>That 500ms initial delay must exist
>> SOMEwhere in the OS, but where?
>
>That place is the registry.

Do you know where?

MM