滚动到相应位置:
mshtml.HTMLDocument doc1 = (mshtml.HTMLDocument)this.webBrowser1.Document.DomDocument;
doc1.parentWindow.scrollBy(0, 1500);
模拟点击
int x = 505; // X 点
int y = 22; // Y 点
IntPtr handle = webBrowser1.Handle;
StringBuilder className = new StringBuilder(100);
while (className.ToString() != "Internet Explorer_Server")
{
handle = GetWindow(handle, 5); // Get a handle to the child window
GetClassName(handle, className, className.Capacity);
}
IntPtr lParam = (IntPtr)((y << 16) | x);
IntPtr wParam = IntPtr.Zero;
const uint downCode = 0x201; //
const uint upCode = 0x202; //
SendMessage(handle, downCode, wParam, lParam);
SendMessage(handle, upCode, wParam, lParam); // Mouse