the right loop

09-28-2006, 10:03 AM
Can anyone tell me the right way of doing the following.

I have a main menu which is an mdi form. from that i open other forms from menu's and for the main search form i double click anywhere on the mdi form.

I want to know the best way to:
if no forms are open except the main menu then loop round every 10 seconds to see if there are any files in a specified directory.
BUT, if i open any forms or double click the main menu for the loop to stop until no forms are open again.

I have the code for the checking of files etc.
But when i have tried doing a do while the program freezes, do i need to use timers, can you interact with the forms while there is a timer running in the background ?

09-28-2006, 11:09 AM
yes a timer is the way to do it
and yes you can interact with the form

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum