I'm using well-publicized code for featuring a System Tray icon with my program.
The System Tray icon "balloons" a message when a warning occurs, using the Shell_NotifyIcon procedure.
However, I notice when I arrive in the morning and unlock my workstation that a balloon from 10 hours ago is still awaiting a click, even though the warning has long subsided.
Is there a way to programmatically reverse the call to balloon a message?
Here is the code I'm using to present the balloon:
(The refresh of this program is every minute, so I'd prefer not to remove/re-add the Systray icon when no errors are present. Doing this is noticable and irritating in the System Tray.)
The System Tray icon "balloons" a message when a warning occurs, using the Shell_NotifyIcon procedure.
However, I notice when I arrive in the morning and unlock my workstation that a balloon from 10 hours ago is still awaiting a click, even though the warning has long subsided.
Is there a way to programmatically reverse the call to balloon a message?
Here is the code I'm using to present the balloon:
Code:
Public Sub ShellTrayModifyTip(MyHeader As String, MyText As String, MyType As String)
Dim nid As NOTIFYICONDATA
If NOTIFYICONDATA_SIZE = 0 Then SetShellVersion
With nid
.cbSize = NOTIFYICONDATA_SIZE
.hWnd = frmGUI.hWnd
.uID = frmGUI.Icon
.uFlags = NIF_INFO
Select Case MyType
Case "Warning": .dwInfoFlags = NIIF_WARNING
Case "Error": .dwInfoFlags = NIIF_ERROR
End Select
.szInfoTitle = MyHeader & vbNullChar
.szInfo = MyText & vbNullChar
End With
Call Shell_NotifyIcon(NIM_MODIFY, nid)
End Sub
(The refresh of this program is every minute, so I'd prefer not to remove/re-add the Systray icon when no errors are present. Doing this is noticable and irritating in the System Tray.)