SendMessage WM_GETTEXT的小错误
PrivateConstWM_GETTEXT=&HDPrivateDeclareFunctionSendMessage&Lib"user32"Alias"SendMess...
Private Const WM_GETTEXT = &HD
Private Declare Function SendMessage& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any)
Private Sub Command1_Click()
Dim a As String
Dim w As Long
w = SendMessage(263042, WM_GETTEXT, 10, ByVal a)
If w = 0 Then
MsgBox "失败"
Else
Text1.Text = a
End If
End Sub 展开
Private Declare Function SendMessage& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any)
Private Sub Command1_Click()
Dim a As String
Dim w As Long
w = SendMessage(263042, WM_GETTEXT, 10, ByVal a)
If w = 0 Then
MsgBox "失败"
Else
Text1.Text = a
End If
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询