|
-
Dec 4th, 2009, 08:34 AM
#1
Thread Starter
Addicted Member
Webbrowser click fires twice
In VS2005 I am using click on some elements in a webbrowser document to perform certain functions, eg print or open MS Paint but for some reason all the mouse events fire twice. A second click on the same element might be intentional so I can't just bypass code if the ID is the same as last time. There are no other calls of Document_Click anywhere in the project.
Main code is:-
Private Sub mainbox2_DocCompleted(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
MainBox2.Document.AddHandler .Click, New HtmlElementEventHandle (AddressOf Document_Click)
End Sub
Private Sub Document_Click(ByVal sender As Object, ByVal e As HtmlElementEventArgs)
etc - code here gets done twice
I supposes I could stick a timer on it and ignore any within 1s say but cheers for any more elegant solutions.
Last edited by xoggoth; Dec 4th, 2009 at 08:51 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|