Hello i am trying to get the xp system tray bubble popup to work
i have this code but when i run it nothing happens (but the api function returns true!) any one got any ideas or working bubble code?
-Karl
thanks alot for any info ahead of time Karl Pietri
Code:
Private Sub Command1_Click()
Me.Show
Me.Refresh
With nid
.cbSize = Len(nid)
.uFlags = NIF_INFO
.uTimeout = 10000
.szInfo = "this is a test bubble"
.szInfoTitle = "test"
End With
temp = Shell_NotifyIcon(NIM_MODIFY, nid)
End Sub
----------------------------module code---------
'-----------converted from ms c++ documentation
Public Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
dwState As Long
dwStateMask As Long
szInfo As String * 256
'unioned value of uTimeout and Uversion.
uTimeout As Long
szInfoTitle As String * 64
dwInfoFlags As Long
End Type
'---------end converted ms
'---------from ms
Public Const NIM_ADD = &H0
Public Const NIM_MODIFY = &H1
Public Const NIM_DELETE = &H2
Public Const NIF_MESSAGE = &H1
Public Const NIF_ICON = &H2
Public Const NIF_TIP = &H4
Public Const WM_MOUSEMOVE = &H200
Public Const WM_LBUTTONDOWN = &H201 'Button down
Public Const WM_LBUTTONUP = &H202 'Button up
Public Const WM_LBUTTONDBLCLK = &H203 'Double-click
Public Const WM_RBUTTONDOWN = &H204 'Button down
Public Const WM_RBUTTONUP = &H205 'Button up
Public Const WM_RBUTTONDBLCLK = &H206 'Double-click
Public Declare Function SetForegroundWindow Lib "user32" _
(ByVal hwnd As Long) As Long
Public Declare Function Shell_NotifyIcon Lib "shell32" _
Alias "Shell_NotifyIconA" _
(ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
Public nid As NOTIFYICONDATA
'----------from ms
'-----------got from web site is it right?
Public Const NIF_STATE = &H8
Public Const NIF_INFO = &H10
Public Const NIS_HIDDEN = &H1
Public Const NIS_SHAREDICON = &H2
Public Const NOTIFYICON_VERSION = &H1
Public Const NIIF_WARNING = &H30
Public Const NIIF_ERROR = &H10
Public Const NIIF_INFO = &H40
'-------------end from web site
thanks alot for any info ahead of time Karl Pietri