hi im useing this Code to Simulate Mouseclicks on the Screen
but when i try to have it click a button in my form1.webbrowser it doesn't click it ? anyone know why ? it can click anything on my form1 but if i try to have it click a button inside my webbrowser at the x,y it is at it doesn't click it if anyone could Help me out the would be GreatCode:Module WinFromPoint Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" ( _ ByVal hwnd As IntPtr, _ ByVal wMsg As Int32, _ ByVal wParam As Int32, _ ByVal lParam As Int32) As Int32 Public Declare Function WindowFromPoint Lib "user32" ( _ ByVal stPoint As Point) As IntPtr Public Const WM_LBUTTONDOWN = &H201 Public Const WM_LBUTTONUP = &H202 Public Sub DoClick() Dim MyPoint As Point MyPoint.X = 50 MyPoint.Y = 50 Dim ptHwnd As IntPtr = WindowFromPoint(MyPoint) Dim retVal As Int32 = PostMessage(ptHwnd, WM_LBUTTONDOWN, 0, 0&) retVal = PostMessage(ptHwnd, WM_LBUTTONUP, 0, 0&) End Sub End Module
& i know how to Click buttons in a webbrowser but i just want to do it list way



Reply With Quote



Bookmarks