JABOSL
Programmer
- Jan 25, 2006
- 35
I would like to know the best way to have a program start working on startup and keep looping until someone clicks file exit. It needs to go as fast as possible.
I've used a loop like:
dim continue as boolean = true
do while continue
I sprinkle application.doevents inside the loop so the program remains responsive and the file/exit button sets continue to false.
But, I've heard folks say that's bad. One recommended a timer. I can see a timer starting a 5 minute process ever 15 minutes or something like that but I can't see it helping me. I have what I hope will be a second or less process and as soon as it's done the process needs to be done again. Over and over until eternity.
Is there a more appropriate way of doing it in .net than the do while continue method?
I've used a loop like:
dim continue as boolean = true
do while continue
I sprinkle application.doevents inside the loop so the program remains responsive and the file/exit button sets continue to false.
But, I've heard folks say that's bad. One recommended a timer. I can see a timer starting a 5 minute process ever 15 minutes or something like that but I can't see it helping me. I have what I hope will be a second or less process and as soon as it's done the process needs to be done again. Over and over until eternity.
Is there a more appropriate way of doing it in .net than the do while continue method?