运行时就出错,
将图标添加到系统托盘出错:实时错误‘453’,找不到DLL入口点 Shell_NotifyIcon in shell32.dll
代码如下:
哪位高手帮忙看看,是哪的问题
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_DELETE = &H2
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4
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
Private TrayIcon As NOTIFYICONDATA
Private Sub Command1_Click()
Shell_NotifyIcon NIM_ADD, TrayIcon
End Sub
Private Sub Command2_Click()
Shell_NotifyIcon NIM_DELETE, TrayIcon
End Sub
Private Sub Form_Load()
TrayIcon.cbSize = Len(TrayIcon)
TrayIcon.hwnd = Me.hwnd
TrayIcon.uFlags = NIF_ICON Or NIF_TIP
TrayIcon.hIcon = Image1.Picture
TrayIcon.szTip = "Icon" & vbNullChar
End Sub
[此贴子已经被作者于2007-8-5 17:01:53编辑过]