I load an HTML document into a WebBrowser Control in Visual Basic 6.
There is a link something
<a href="something" onmousedown="return abc(this,'asd', 'AO',null,event)">
I want to invoke the onmousedown event programatically from VB
I've tried many things, including
doc.getElementsByTagName("a")(i).InvokeMember("MouseDown")
doc.getElementsByTagName("a")(i).RaiseEvent("OnMouseDown")
doc.getElementsByTagName("a")(i).MouseDown
but nothing seems to work.
I haven't tried to do this myself, but this vbcity post contains a description and some sample code for this. Scroll down to the last post on the first page of the thread.
http://vbcity.com/forums/t/37407.aspx
To boil the above post down to essentials, the members of the forms collection can be iterated to find the button which is then clicked.
Replace 'formname' and 'buttonvalue' with appropriate values