Home > Software engineering >  To a third party program assignment in the text box. The HTML code is as follows, but always can
To a third party program assignment in the text box. The HTML code is as follows, but always can

Time:09-30

I need to a third party program assignment in the text box, and the HTML code is as follows, but always can't get a handle to the window? Hope everybody to help me see

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 handle

CodePudding 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
  •  Tags:  
  • API
  • Related