Oh sorry am using vb 2003.
Okay had a little read off all that boring thread stuff, then reverted to the method that mankind has been using for millenia.
Give it a go without any understanding of the consequences.
So using the above theory have come up with this, which seems to work.
VB Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load t = New Thread(AddressOf processweb) t.IsBackground = True t.Start() End Sub Private Sub processweb() Do startwebcount = True Me.txtwebcount.Text = 30 Thread.Sleep(30000) startwebcount = False If doweb = True Then Me.Pbweb.Value = 10 Me.txtwebcall.Text = CStr(CLng(Me.txtwebcall.Text) + upwebsite.getupcalldata()) Thread.Sleep(0) Me.Pbweb.Value = 20 Me.txtwebcomp.Text = CStr(CLng(Me.txtwebcomp.Text) + upwebsite.getupcompdata()) Thread.Sleep(0) Me.Pbweb.Value = 50 Me.txtwebemp.Text = CStr(CLng(Me.txtwebemp.Text) + upwebsite.getupempdata()) Thread.Sleep(0) Me.Pbweb.Value = 70 Me.txtwebcon.Text = CStr(CLng(Me.txtwebcon.Text) + upwebsite.getupcondata()) Thread.Sleep(0) Me.Pbweb.Value = 90 Me.txtremwebemp.Text = CStr(CLng(Me.txtremwebemp.Text) + upwebsite.getwebchanges()) Me.Pbweb.Value = 100 Me.Pbweb.Value = 0 End If Loop End Sub
As I say this seems to work, but who knows, not me as reading stuff hurts my head, so if anyone wiser and more literate than me could confirm or deny if the above makes sense.
Cheers




Reply With Quote