I'm looking for some help or suggestions about something I'm working
on. I'm using the webbrowser control in VB.net. I want to click a
button and have the webbrowser go to a certain website (done). Then I
want it to wait a period of time and then do something on the page its
on. The part I'm having a problem with is the waiting period. in the
main form I have no problem manipulating controls or anything like
that.
One solution would be to use thread.sleep() but that locks the ui and
I don't like that.
What I am trying to do is have a backgroundworke r do the waiting then
perform the necessary actions on the webpage, but the backgroundworke r
isn't able to access that thread, makes sense. What I can't figure
out is how to get around this. I've explored delegates but that
doesn't seem to do what I want as it doesn't allow me to put the
background thread to sleep BEFORE it does its work.
Suggestions? Good tutorials?
Thanks!
on. I'm using the webbrowser control in VB.net. I want to click a
button and have the webbrowser go to a certain website (done). Then I
want it to wait a period of time and then do something on the page its
on. The part I'm having a problem with is the waiting period. in the
main form I have no problem manipulating controls or anything like
that.
One solution would be to use thread.sleep() but that locks the ui and
I don't like that.
What I am trying to do is have a backgroundworke r do the waiting then
perform the necessary actions on the webpage, but the backgroundworke r
isn't able to access that thread, makes sense. What I can't figure
out is how to get around this. I've explored delegates but that
doesn't seem to do what I want as it doesn't allow me to put the
background thread to sleep BEFORE it does its work.
Suggestions? Good tutorials?
Thanks!
Comment