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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 6 Executable Clear Events doesn't seem to take place?

Status
Not open for further replies.

Webrookie

Programmer
May 18, 2000
112
US
I have one Foxpro application which I am merely running from the Foxpro environment calling another foxpro application as an executable with the run command.

The other executable starts up just fine and runs through all the steps I want it to, but it doesn't shut down properly?

A form is shown for informational purposes of what it's doing. The main steps take place in a custom method, right now just had a label's caption being assigned "Done."

After the method is run, i issue thisform.release
in the release method I have clear events

the form disappears, but it remains in memory and I have to kill it in task manager. I'm not sure what the problem is because the form / main.prg are both set up the same way I've done all my projects. Any ideas?
 
You have a
THISFORM.RELEASE()
CLEAR EVENTS

on the button click method, correct?

Put set step on right after the form call in the main.prg file and see what happens next. My guess is that the clear events is not actually being fired.
 
clear events is in the release event of the form

thisform.release is part of the button.

I just stepped through it. It's going into the release event, and it runs the clear events command...at least i stepped into it anyway, but it doesn't actually clear events?

blah.
 

Try moving it to the QueryUnload of the form, or put it after the Thisform.Release() in the click of your button.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Try moving it to the QueryUnload of the form, or put it after the Thisform.Release() in the click of your button.

Mike Gagnon


Neither of these worked :/
 

I have one Foxpro application which I am merely running from the Foxpro environment calling another foxpro application as an executable with the run command.

Are you trying to close a FoxPro application from another FoxPro application?


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Webrookie,

clear events is in the release event of the form

Put it in the Destroy.

The Release is only fired if you programmatically release the form. Destroy is always fired.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Are you trying to close a FoxPro application from another FoxPro application?
no. I have one foxpro app that I built as an executable that on activate calls a button click. In the button click I have it run some code and then call thisform.release. In the release event I had clear events. That is an executable.

I have another foxpro app that I am using to call it as an exe, but this matters little now as I have been running the previously described app from foxpro and it still produces the same result: that of not clearing events.

Put it in the Destroy.

The Release is only fired if you programmatically release the form. Destroy is always fired.

Also didn't work. What would cause the form to disappear as though it was released, but not clear events?
 
Is the executable you call made only by a form (set main) ? I think it works if you remake the executable and use first a program where in you call the form to run

mainprog.prg
...
DO FORM .....
READ EVENTS

In the form you issue the normal release.

Could be a weird tip, I never made a program calling another foxpro exe. Maybe there is a difference in the way you call the exe ... are you using RUN or the API-way ?

Greetings, Peter
 
Is the executable you call made only by a form (set main) ? I think it works if you remake the executable and use first a program where in you call the form to run

mainprog.prg
...
DO FORM .....
READ EVENTS

In the form you issue the normal release.

Could be a weird tip, I never made a program calling another foxpro exe. Maybe there is a difference in the way you call the exe ... are you using RUN or the API-way ?

I'm calling the form with a main.prg. From that form I call the foxpro executable.

I'm calling the executable using the Run Command.

If I remove the line "thisform.release" and instead just click the [x] in the upper right of the form, it works fine..closes. It's just having it programmatically close does not work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top