Background:
A file is fist FTP-ed to a certain folder. Then my program identifies the file (sometimes using only the filename, but other times the file is opened up and it is searhed for any identifying text)
This process can be paused by checking a 'Pause' checkbox. A while loop runs while the checkbox is un-checked.
Problem:
When there are no files in the folder (for the program to process) then my program works ok - there is a little pause...but nothing upsetting. However, when there are files in the folder (and the checkbox is not checked) then the program is constantly running (of course) and the gui
rarely refreshes. Only a big white box surrounded by the window's border) appears.
I know that because of processing (and the while loop) the CPU rarely takes the time to refresh the GUI. The program eats up about 20 - 40% of the CPU's processing. I've added a lot of DoEvents() statements within the program.
The while loop is wanted so that the folder is constanty checked with no delay.
Question:
Is there something more that I can do so that the GUI refreshes and it does not behave in such a jagged manner?
A file is fist FTP-ed to a certain folder. Then my program identifies the file (sometimes using only the filename, but other times the file is opened up and it is searhed for any identifying text)
This process can be paused by checking a 'Pause' checkbox. A while loop runs while the checkbox is un-checked.
Problem:
When there are no files in the folder (for the program to process) then my program works ok - there is a little pause...but nothing upsetting. However, when there are files in the folder (and the checkbox is not checked) then the program is constantly running (of course) and the gui
rarely refreshes. Only a big white box surrounded by the window's border) appears.
I know that because of processing (and the while loop) the CPU rarely takes the time to refresh the GUI. The program eats up about 20 - 40% of the CPU's processing. I've added a lot of DoEvents() statements within the program.
The while loop is wanted so that the folder is constanty checked with no delay.
Question:
Is there something more that I can do so that the GUI refreshes and it does not behave in such a jagged manner?