Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enable - false or true 1

Status
Not open for further replies.

monikai

Programmer
Aug 4, 2002
358
PL
Hi Fiends !
My new puzzle:
I have a fom. There are button Run and label Wait. Wait cover Run, but Wait.Visible is false. And when i am startng i see button Run.

Run.Click Event code:
ThisForm.Run.Enabled=.F.
ThisForm.Wait.Visible=.T.
LONG CODE (2-5 minutes)
ThisForm.Run.Enabled=.T.
ThisForm.Wait.Visible=.F.

And when the code is running my unpatient use click on the all screen. Run.Click event starts again and again.
Any advice ? I adviced to hide hands.
I use VFP 6.0.
Thanks


Regards from Monika (Warszawa - Poland)
(monikai@yahoo.com)
 
Hi

1. You can discard the Wait Label and
have only Run Command Button..

2. In the click event of Run button.. put the code..

** be careful with the upper and lower case..
IF This.Caption = "Run"
This.Caption = "Please Wait"
This.Refresh()
.. do all my code..
This.Caption = "Run"
ENDIF

This should fix it.


____________________________________________
Ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Hi Monikai

The code I inserted, may not work, if you are processing or calling any other external executables.. example.. Zip/BackUp/Batch commands whatever non VFP execution code.
If that is the case, I suggest post what exactly is your operation to suggest a suitable code. There are different ways to handle these and make VFP wait for the completion of such operations.

:)





____________________________________________
Ramani - (Subramanian.G) :)
When you ask VFP questions, please add VFP version.
 
Thanks, Ramani. I'll try your first suggestion.


Regards from Monika (Warszawa - Poland)
(monikai@yahoo.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top