vb.net 2012调用GetAsyncKeyState的问题
PublicClassForm1PrivateDeclareFunctionGetAsyncKeyStateLib"user32"(ByValvKeyAsLong)AsI...
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If GetAsyncKeyState(1) < 0 Then
Button1.Text = "Hello world!"
End If
End Sub
End Class
上面是我的代码,但是运行发生一个错误 展开
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If GetAsyncKeyState(1) < 0 Then
Button1.Text = "Hello world!"
End If
End Sub
End Class
上面是我的代码,但是运行发生一个错误 展开
2个回答
展开全部
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer
long 改 Integer
long 改 Integer
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在.net里返回值 应该short
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询