|
-
Apr 30th, 2013, 07:37 AM
#2
Thread Starter
Hyperactive Member
Re: [2010] Clicking webbrowser element, only working once per program startup..
Sorry for all the confusion on this if it caused any. I actually tracked down the issue of the code inside the button click erroring from being executed inside a timer. For the longest time, I was confused, wondering why it worked when clicked, but not from a timer. The timer was causing a green debug line with the message "Specified Cast Invalid" when trying to get the HtmlElementCollection.
Turns out, I was running a System.Timer.Timers instead of a System.Windows.Forms.Timer. I was unsure why this was an issue as I didn't experience any cross threading issues. Also, I've accessed the webbrowser documents from other threads before. Well, at least after changing it to a windows forms timer it works. Hope this could help someone else!
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
|