有关vb语言编程的API函数问题
为什么我在通用部分里声明了以下语句后出现用户定义类型未定义的情况?是不是还有什么没有加载或其他问题,我应该怎么做?DeclareFunctionGetCursorPosL...
为什么我在通用部分里声明了以下语句后出现用户定义类型未定义的情况?是不是还有什么没有加载或其他问题,我应该怎么做?
Declare Function GetCursorPos Lib "user32" (lpPoint As PoinTAPI) As Long
Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long 展开
Declare Function GetCursorPos Lib "user32" (lpPoint As PoinTAPI) As Long
Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long 展开
3个回答
展开全部
你的问题大概是你不小心造成的:
应该写成
public Declare Function GetCursorPos Lib "user32" (lpPoint As PoinTAPI) As Long
public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
在通用模块中要加上关键字:public
如果你没有加入此关键字,那就会报找不到的错误,你试一试吧!
应该写成
public Declare Function GetCursorPos Lib "user32" (lpPoint As PoinTAPI) As Long
public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
在通用模块中要加上关键字:public
如果你没有加入此关键字,那就会报找不到的错误,你试一试吧!
展开全部
Type POINTAPI
x As Long
y As Long
End Type
加在前面
x As Long
y As Long
End Type
加在前面
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询