|
-
Jul 13th, 2009, 09:27 AM
#41
Thread Starter
Lively Member
Re: ping using vb.error ??
ha mickey was giving out to me for starin a new one now your giving out to me for not startin a new-one ! ders no keeping ye thread-heads happy . yeah im fairly new to vb so i just want to try and keep the solution as simple as possible. and i dont mind if the program appears to pause for a few seconds in fact i dont mind if it pauses for a few mins , its more than likely only going to be run once a day so that wont really be an issue as long as it does run !
so how would these Application.DoEvents() at the start of the array solve this problem ?
-
Jul 13th, 2009, 09:32 AM
#42
Re: ping using vb.error ??
Yes it solves...
BTW, you have a progress bar that does nothing...
Put this before the for cycle:
VB.NET Code:
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = ds.Tables("monitor").Rows.Count - 1
And inside put this
Rate People That Helped You
Mark Thread Resolved When Resolved
-
Jul 13th, 2009, 09:32 AM
#43
Re: ping using vb.error ??
so how would these Application.DoEvents() at the start of the array solve this problem ?
At the start of the loop you mean. An Array is a collection of objects, you are looping through the array with your "For i = 0 To..." etc etc code.
Application.DoEvents() basically just pauses your code execution for a brief moment to let the application process messages that have been sent to it (this is the message pump that your error message mentioned). These messages are sent to a program all the time by windows and are what tells it when you have clicked something or when it needs to update the screen etc, which is why without processing this "message pump" then your program appears to freeze.
Tags for this Thread
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
|