Results 1 to 1 of 1

Thread: Question about Shell_NotifyIcon function - error 1008

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,945

    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
    Last edited by Peter Swinkels; Dec 9th, 2012 at 11:17 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width