求教 :总是报错 453:找不到DLL入口点 ShellL_NotifyIconA in shell32.dll
求教 :总是报错 453:找不到DLL入口点 ShellL_NotifyIconA in shell32.dll小弟刚学,请大侠指教一下下面的程序:
Option Explicit
Const MAX_TOOLTIP As Integer = 64
Const NIF_ICON = &H2
Const NIF_MESSAGE = &H1
Const NIF_TIP = &H4
Const NIM_ADD = &H0
Const NIM_DELETE = &H2
Const VM_MOUSEMOVE = &H2
Const VM_LBUTTONDOWN = &H201
Const VM_LBUTTONUP = &H202
Const VM_LBUTTONDBLCLK = &H203
Const VM_RBUTTONDOWN = &H204
Const VM_RBUTTONUP = &H205
Const VM_RBUTTONDBLCLK = &H206
Const SW_RESTORE = 9
Const SW_HIDE = 0
Private Type NotifyIcondata
cbsize As Long
hwnd As Long
uID As Long
uFlags As Long
uCallbackMessage As Long
bIcon As Long
szTip As String * MAX_TOOLTIP
End Type
Private Declare Function showwindow Lib "user32" (ByVal hwnd As Long, ByVal ncmdshow As Long) As Long
Private Declare Function shell_NotifyIcon Lib "shell32.dll" Alias "shell_NotifyIconA" (ByVal dwmessage As Long, lpdata As NotifyIcondata) As Long
Private nfIcondata As NotifyIcondata
Private Sub Command1_Click()
nfIcondata.hwnd = Me.hwnd
nfIcondata.uID = Me.Icon
nfIcondata.uFlags = NIF_ICON Or NIF_MESSAGE Or NIF_TIP
nfIcondata.uCallbackMessage = VM_MOUSEMOVE
nfIcondata.bIcon = Me.Icon.Handle
nfIcondata.szTip = "system tray example" & vbNullChar
nfIcondata.cbsize = Len(nfIcondata)
Call shell_NotifyIcon(NIM_ADD, nfIcondata)
End Sub
Private Sub Command2_Click()
Call shell_NotifyIcon(NIM_DELETE, nfIcondata)
End Sub
Private Sub Command3_Click()
showwindow Me.hwnd, SW_HIDE
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Command5_Click()
Me.Visible = False
End Sub
Private Sub form_mousemove(button As Integer, shift As Integer, x As Single, y As Single)
Dim lmsg As Single
lmsg = x / Screen.TwipsPerPixelX
If lmsg = VM_RBUTTONUP Or lmsg = VM_LBUTTONUP Then Me.PopupMenu (Form1)
End Sub
Private Sub move_click()
Call shell_NotifyIcon(NIM_DELETE, nfIcondata)
End Sub
Private Sub show_click()
Me.Visible = True
End Sub
Private Sub exit_click()
Unload Me
End Sub