Quantcast
Viewing all articles
Browse latest Browse all 168

Question about Shell_NotifyIcon function - error 1008

When calling the Shell_NotifyIcon function with the NIM_ADD message the function succeeds, but I still get error code 1008 (ERROR_NO_TOKEN).

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

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

Viewing all articles
Browse latest Browse all 168

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>