Tray tip not dynamic, how to refresh? 
Author Message
 Tray tip not dynamic, how to refresh?

I'm using the standard code to put my program into the system tray and
enable a tray tip. I'm changing the tray tip based on a counter and
therefore the tip changes every second. However when I hold the cursor
over the tip, it shows the correct value at that instant but the value
does not change. When I move the cursor away, and then back again, the
tip reappears with the updated value. Does anyone know of a way to have
the tip dynamically update itself while it is being viewed. Thanks for
any help. -Craig

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Mon, 21 Jan 2002 03:00:00 GMT  
 Tray tip not dynamic, how to refresh?
Surely if you have the ToolTip's HWND, you can SetWindowText()
to your heart's content and have it update on the fly?

I haven't tried this, though - just an idea.

.

Quote:

>I'm using the standard code to put my program into the system tray and
>enable a tray tip. I'm changing the tray tip based on a counter and
>therefore the tip changes every second. However when I hold the cursor
>over the tip, it shows the correct value at that instant but the value
>does not change. When I move the cursor away, and then back again, the
>tip reappears with the updated value. Does anyone know of a way to have
>the tip dynamically update itself while it is being viewed. Thanks for
>any help. -Craig



Mon, 21 Jan 2002 03:00:00 GMT  
 Tray tip not dynamic, how to refresh?
Hi,

If you're setting up the SysTray-Icon with
Shell_NotifyIcon function, then you will have to call it
again to change the ToolTip text with the Message parameter set
to NIM_MODIFY.
In the NOTIFYICONDATA  structure the Tip variable is set to
the new value (e.g. NIStruct.TipText="New ToolTip")
and the Flags variable must be set to NIF_TIP to indicate
that the ToolTip text is affected by this call.
Call the function and the text should have changed.

hope this helps,
Benjamin Battran

Quote:
>I'm using the standard code to put my program into the system tray and
>enable a tray tip. I'm changing the tray tip based on a counter and
>therefore the tip changes every second. However when I hold the cursor
>over the tip, it shows the correct value at that instant but the value
>does not change. When I move the cursor away, and then back again, the
>tip reappears with the updated value. Does anyone know of a way to have
>the tip dynamically update itself while it is being viewed. Thanks for
>any help. -Craig

>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.



Mon, 21 Jan 2002 03:00:00 GMT  
 Tray tip not dynamic, how to refresh?
a possible method is to move the mouse away and back after every update
using the get and set cursor api calls...of course, this should only be
done while the mouse is over the icon in the system tray...another possible
method would be to subclass the mouse and when the counter increases,
cancel the message sent to the icon, this will prevent the tool tip from
showing up (theoretically) and then, it will pop back up the next time the
message is received...
Quote:

> I'm using the standard code to put my program into the system tray and
> enable a tray tip. I'm changing the tray tip based on a counter and
> therefore the tip changes every second. However when I hold the cursor
> over the tip, it shows the correct value at that instant but the value
> does not change. When I move the cursor away, and then back again, the
> tip reappears with the updated value. Does anyone know of a way to have
> the tip dynamically update itself while it is being viewed. Thanks for
> any help. -Craig

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.



Tue, 29 Jan 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. tray tip refresh (dynamic) when viewing

2. Dynamic ADO Recordset Not Dynamic (Does Not Refresh Data)

3. Dynamic ADO Recordset Not Dynamic (Does Not Refresh Data)

4. tool tips running off edge of userform and not refreshing

5. Multi-line Icon Tray Tool Tips using VB

6. System Tray Tip

7. System Tray Tool Tips

8. A tip for all that use system tray menus

9. Data Report Refresh (not refreshing)

10. Refresh Icon in Task Tray?? VB6

11. Refresh System Tray Icons

12. System Tray Tooltip Refresh

 

 
Powered by phpBB® Forum Software