This is working fine for, however my question is now... how do I make it press a button.Code:Public Class Form1 Public Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Int32 Public Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Int32, ByVal hWnd2 As Int32, ByVal lpsz1 As String, ByVal lpsz2 As String) As Int32 Public Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As String) As Int32 Public Const WM_SETTEXT As Int32 = &HC Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSEND.Click Dim hWnd As Int32 = FindWindow("#32770", vbNullString) If hWnd > 0 Then Dim hWndChild As Int32 = FindWindowEx(hWnd, 0, "ATL:00B4C870", vbNullString) If hWndChild > 0 Then MsgBox("Found!") ' Check to see if it is working Dim strText As String = textbox1.Text SendMessage(hWndChild, WM_SETTEXT, 0, strText) End If End If End Sub End Class
http://img399.imageshack.us/my.php?image=btnqa6.jpg
Above is the properties of the button.
Thanks guys!!![]()




Reply With Quote