-
I have written a program to install an application patch on remote machines.
This is done by mapping a drive to a PC that is listed in a database, then using the copyfolder command installs the new patch. The program, then disconnects the mapping and moves to the next PC in the list.
My problem comes if I wish to end the program early. Because this program runs in a do while database is not EOF, the form will not respond when I click on the exit button, or any other button as if it has lost focus or is busy copying the files.
Is there a way that I can stop the form from loosing functionality while thing is in the loop.
Thanks
[email protected]
-
I am somewhat new at this, however you can add a value to the exit button, say boolean for example, (or a numeric) if the button is activated, then the value will change.
Then add a line of code in your do loop that says
do while......(existing code)...And _
(boolean value of button) = True
then each cycle through the loop it will determine weather the value had changed.
I hope this helps!
Lee
-
The problem is that I can not click on anything on the form as it has lost focus as the program is busy mapping drives and copying files.
-
Lee M.
You could try using the Doevents statement in the loop
which should catch a mouse click on a exit button (eventually)
but most people swear against the doevents statement for various reasons.
Use it as a last resort.
John
-
-
You could......
......try adding another form to that app and that has the exit button on it.