Results 1 to 2 of 2

Thread: Trayicon Remove Icon anyone?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2003
    Posts
    135

    Question Trayicon Remove Icon anyone?

    im using the following code to add an icon with a menu to the task bar everything works well but i was wondering if anyone could show me how to remove the icon in code?

    thanks in advance everyone

    [Highlight=VB]
    Option Explicit

    Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean

    Private Const NIM_ADD = &H0
    Private Const NIM_MODIFY = &H1
    Private Const NIM_DELETE = &H2
    Private Const NIF_MESSAGE = &H1
    Private Const NIF_ICON = &H2
    Private Const NIF_TIP = &H4
    Private Const WM_MOUSEMOVE = &H200
    Private Const WM_LBUTTONDOWN = &H201 'Button down
    Private Const WM_LBUTTONUP = &H202 'Button up
    Private Const WM_LBUTTONDBLCLK = &H203 'Double-click
    Private Const WM_RBUTTONDOWN = &H204 'Button down
    Private Const WM_RBUTTONUP = &H205 'Button up
    Private Const WM_RBUTTONDBLCLK = &H206 'Double-click

    Private nid As NOTIFYICONDATA

    Private Type NOTIFYICONDATA
    cbSize As Long
    hWnd As Long
    uID As Long
    uFlags As Long
    uCallbackMessage As Long
    hIcon As Long
    szTip As String * 64
    End Type

  2. #2
    Frenzied Member dis1411's Avatar
    Join Date
    Mar 2001
    Posts
    1,048
    VB Code:
    1. Shell_NotifyIcon NIM_DELETE, nid

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