找不到Shell_NotifyIconA入口点,是怎么回事

romyks 2002-10-21 04:27:38
写了一个将程序加入系统托盘的程序,但编译后却说找不到Api函数的入口点.请各位高手看看,是怎么回事.
Module1
Option Explicit
Public Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias " Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long
Public Const NIM_ADD = 0
Public Const NIM_MODIFY = 1
Public Const NIM_DELETE = 2
Public Const NIF_ICON = &H2
Public Const NIF_MESSAGE = &H1
Public Const NIF_TIP = &H4
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
Form1
Private Sub Form_Load()
Dim TheData As NOTIFYICONDATA
With TheData
.UID = 0
.HWnd = Me.HWnd
.cbSize = Len(TheData)
.HIcon = Picture1.Picture.Handle
.UFlags = NIF_ICON
' .UCallBackMessage = TRAY_CALLBACK
.UFlags = NIF_ICON Or NIF_MESSAGE
.cbSize = Len(TheData)
End With
Shell_NotifyIcon NIM_ADD, TheData
End Sub

很急,先谢谢了
...全文
9 点赞 收藏 7
写回复
7 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
myhfit 2002-10-26
APIViewer就是有问题的
回复
qyyayong 2002-10-23
.UCallBackMessage =WM_MOUSEMOVE

回复
romyks 2002-10-23
可我是直接从APIViewer里复制出来的啊,怎么会躲了个空格呢
回复
sgx 2002-10-22
同意楼上
我也遇到过同样的问题。去掉空格就好了。
回复
danielinbiti 2002-10-21
同意楼上,你多了个空格
回复
jokingjun 2002-10-21
在你定义这个函数时,将Alias"这个当中不能有空格"
你将空格去掉试一试
回复
chenyu5188 2002-10-21
' .UCallBackMessage = TRAY_CALLBACK
前面多了一个引号,去了试试 ̄!!!
回复
发动态
发帖子
API
创建于2007-09-28

1456

社区成员

VB API
申请成为版主
社区公告
暂无公告