Question Send Mouse Events to form control with Coordinates.

updatesvc

New member
Joined
Apr 25, 2016
Messages
2
Programming Experience
Beginner
I am in midst of coding a webbrowser automation tool.
I am using the Awesomium Web Control for WinForms in VB.Net.
I have the inputs
VB.NET:
[B]mouse_X[/B] and [B]mouse_Y[/B] 'relative to the webcontol [I]Left[/I] And [I]Top[/I]
I need help to basically send mouse events to the Webcontrol.
I have managed to do this when the windows is active(not minimised).
I would like to know how to send mouse events (mouse move and mouse left down) without affecting the users mouse directly and also when the windows is minimised.

Things I have tried before asking this question:
  1. I have tried to use other WebConrol1.XXX methods->these don't work.reason ->The WebControl.InjectMouseMove for Awesomium is actual a protected method of the class WebControl(which is in a dll).The work around says creating a sub class of the webControl.But that needs editing the xxx.designer.vb directly.
  2. Gone through some related threads on other forums relating to the above (mouse emulation).Most of them talk of sending click to other applications other than the parent form/application. I am 90%:cocksure:sure their code can be edited to match the above but I am not familiar to the use of 'user32.dll'

I would really appreciate an answer that is noob friendly.
Thanks in advance.
 
I have not used it, but according to web search you should be able to cast WebControl to IWebView and use the InjectMouseMove of that interface. Typically:
CType(WebConrol1, IWebView).InjectMouseMove(params)

According to same you should set WebControl.ViewType to WebViewType.OffScreen in designer.
 
I have not used it, but according to web search you should be able to cast WebControl to IWebView and use the InjectMouseMove of that interface. Typically:
CType(WebConrol1, IWebView).InjectMouseMove(params)

According to same you should set WebControl.ViewType to WebViewType.OffScreen in designer.


:DThanks a lot. The code Works. I now don't have to mess around with the 'complex' user32.dll API calls.
 

Latest posts

Back
Top