Is there a way to prevent this from running every time a web page is loaded?
For instance I have a web page that opens up upon form load. So right when the form loads it starts running the code that is in the webbrowser document complete event.
I tried adding a counter to the event. So on the first load it incremented an integer value to 1. Then used a simple "if" statement, like "if (countInteger !=1)" then do code. Didn't work as planned though.
Hard for me to explain why, but I think it has something to do with it(web browser doc complete event) getting triggered every time something loads complete on the web page. Like if three images are on the web page it triggers the document complete event 3 times. That's my only guess, because I had to set the value to equal or greater than 10 for it work properly. Even then it wasn't consistent.
Currently my work around is using a timer instead of the web browser document complete, but I would really like to get the document complete event working the way I need. Would be faster at getting my input in.
Using Visual C# 2008.