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

Endin Application - Again

Status
Not open for further replies.

WayneBecker

Programmer
Nov 29, 2000
20
CA
There have been many postings and helps on Shutting down an application I have tried to follow them in my coding but the application will not close when I choose the menu pick "Exit CANstamp".

This is my code sample:

Main Program

MODIFY WINDOW SCREEN TITLE 'Spinney Hill Software'
_screen.icon="c:\canstamp\graphics\shs_16x16.ico"
Owner = "John Tucker"
DO FORM c:\canstamp\forms\canstamp_sign_on.scx
DO c:\canstamp\menus\CANSTAMP.MPR
READ EVENTS


CANSTAMP.MPR "Exit CANstamp" - Menu Pick

ON SHUTDOWN DO c:\canstamp\progs\ShutDownProc


ShutDownProc

Procedure ShutdownProc
CLOSE ALL
CLEAR ALL
CLEAR EVENTS
ON SHUTDOWN
QUIT
ENDPROC


What do I need to fix to make it work?

Thanks in advance...........Wayne
 
Wayne,
Your command ordering just needs a little tweaking - try:
Code:
MODIFY WINDOW SCREEN TITLE 'Spinney Hill Software'
_screen.icon="c:\canstamp\graphics\shs_16x16.ico"
Owner = "John Tucker"
ON SHUTDOWN DO c:\canstamp\progs\ShutDownProc
* Menu is usually usually done before the Form,
*  although this is not critical
DO c:\canstamp\menus\CANSTAMP.MPR
DO FORM c:\canstamp\forms\canstamp_sign_on.scx
READ EVENTS
May I also presume, that your "Exit CANstamp", Menu Pick also does a "DO c:\canstamp\progs\ShutDownProc"?

Rick
 
in reality you only need to issue quit command.

if you are making a executable, and have included the shutdown program in the exe, you do not need to reference the path. all files that are included in the exe do not need path referencing. Only paths needed if the files are external to thr program.

It could be that if your program is included in the exe and you are referencing a path it is not really finding the shutdown program. Attitude is Everything
 
Thanks fellows it worked great. I did have to leave the form ahead of the menu or the form did not appear.

Thanks again for solving my problem...........Wayne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top