Private Sub Command2_Click ()
Shell App. Path & amp; "\ VNC4 \ vncviewer exe," vbNormalNoFocus
Dim HWN As Long
Dim TWN As Long
HWN=FindWindow (vbNullString, "VNC Viewer: Connection Details")
TWN=GetDlgItem (HWN, 1002) '(with SPY + find)
SendMessage TWN, WM_SETTEXT, 0, "10.71.1.1 '//" enter the IP address
If HWN=0 Then
Label1. Caption="failure"
The Else
Label1. Caption="success"
Label2. Caption=HWN
End the If
End Sub
HWN is always 0
CodePudding user response:
Your code to perform fast, interface of the program is still not finished initialization you will be to get a handleCodePudding user response:
Don't worry, let the bullets fly for a while,CodePudding user response:
Didn't write SendMessage also has a problem, length, didn't add ByVal last parameter