When calling the Shell_NotifyIcon function with the NIM_ADD message the function succeeds, but I still get error code 1008 (ERROR_NO_TOKEN).
I did a search on the internet and it appears to have something to do with uID member and icon, but otherwise can't find anything useful.
The complete code can be found here: http://www.vbforums.com/showthread.p...-Image-Monitor
Code:
With TrayIconData
.cbSize = Len(TrayIconData)
.dwInfoFlags = NIIF_INFO
.dwState = 0
.dwStateMask = 0
.hIcon = Me.Icon
.hwnd = Me.hwnd
.szInfo = App.Title & " has started." & vbNullChar
.szInfoTitle = App.Title & vbNullChar
.szTip = App.Title & vbNullChar
.uCallbackMessage = WM_MOUSEMOVE
.uFlags = NIF_ICON Or NIF_INFO Or NIF_MESSAGE Or NIF_TIP
.uID = vbNull
.uTimeoutVersion = 3000
End With
Shell_NotifyIconA NIM_ADD, TrayIconData
Debug.Print Err.LastDllError
The complete code can be found here: http://www.vbforums.com/showthread.p...-Image-Monitor