Public Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long,lpData As NOTIFYICONDATA) As Long"记得要声明NOTIFYICONDATA结构

解决方案 »

  1.   

    楼上说的正确,声明NOTIFYICONDATA结构如下:
    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             '提示字符串
    End Type
      

  2.   

    Private Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long
    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 NIF_DOALL = NIF_MESSAGE Or NIF_ICON Or NIF_TIP
    Private Type NOTIFYICONDATA
        cbSize As Long
        hwnd As Long
        uID As Long
        uFlags As Long
        uCallbackMessage As Long
        hIcon As Long
        sTip As String * 64
    End TypeWith sysIcon
            .cbSize = LenB(sysIcon)
            .hwnd = Me.hwnd
            .uID = 1&
            .uFlags = NIF_DOALL
            .uCallbackMessage = WM_MOUSEMOVE
            .hIcon = ImageList1.ListImages(6).Picture
            .sTip = value & vbNullChar
    End With
    Shell_NotifyIcon NIM_ADD, sysIcon
      

  3.   

    我早就知道,关键是他的声明不正确,有一个地方多了一个空格,请按照API TEXT VIEW中的声明进行正确的声明。
      

  4.   

    为什么我的程序现在显示:找不到DLL入口点 shell_NotifyIconA in shell32.dll
      

  5.   

    你的是不是2000?如果是,那就换98试一下~~
    有的 api在2000里没有,就是出现这个提示。