Interrupt Do While Loop

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jun 2007
Posts: 37
Reputation: Chris147 is an unknown quantity at this point 
Solved Threads: 2
Chris147 Chris147 is offline Offline
Light Poster

Interrupt Do While Loop

 
0
  #1
Oct 22nd, 2007
Hi All,

Does anyone know how to interrupt a Do While Loop?

I have a very simple bit of code that Loops though the items in a ListBox so long as a boolean (blnPaused) = False. There is a Button on the Form that sets the boolean to True but I can't figure out how to get the Click Event to work when the Do While Loop is running.

Any help would be greatly appreciated.

Thanks,

Chris (the Progress Bar is still driving me nuts!).
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 37
Reputation: Chris147 is an unknown quantity at this point 
Solved Threads: 2
Chris147 Chris147 is offline Offline
Light Poster

Re: Interrupt Do While Loop

 
0
  #2
Oct 22nd, 2007
Okay, I think I can't scratch this one - it just doesn't seem possible...

Thanks for looking,

Chris.
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: Interrupt Do While Loop

 
0
  #3
Oct 22nd, 2007
If you are using vb 2005 then use this in your loop.
  1. Do While Boolean
  2. .......
  3. .......
  4. My.Application.Doevents
  5. Loop
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 37
Reputation: Chris147 is an unknown quantity at this point 
Solved Threads: 2
Chris147 Chris147 is offline Offline
Light Poster

Re: Interrupt Do While Loop

 
0
  #4
Oct 23rd, 2007
Like all the best solutions - simple when you know how. It's the knowing how beforehand...

Thank you waynespangler!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC