Some way of controling what happens...

Unforsaken

New member
Joined
Nov 29, 2009
Messages
1
Programming Experience
Beginner
I use Visual Basic.net to create a program that connects to several websites, logins, then post some data. I can't use the httpwebrequest, some java is required on those sites, so i use the webbrowser control.
Now I created a form, some fields for input data and a submit button. The coding part is like this:

sub website1(vars)
'login here
'post some data
'get some data back
'etc
end sub

So every site has its own sub.
Now the submit button calls all of these subs:

Private Sub submit_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submit_btn.Click
call website1
call website2
End Sub
The problem is that I can't control what happens after submit button is clicked. I need to pause or stop the process at any time. If I exit the program while processing, I can see that even if the window disappear, the program is still running!
I tried to use a thread for this, but the subs only get called if I use begininvoke, or invoke on a starter thread... A real mess that I don't quite understand as a beginner.
Any thoughts are appreciated.
 
Back
Top