Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Cannot quit from Main

4 views
Skip to first unread message

Congenital Kano

unread,
Apr 5, 2001, 11:21:23 PM4/5/01
to
Over the last few days, between reading here, RTFMs and a lot of
experimenting, I've gotten all of the elements in a simple set of forms that
search, display and print from a couple of tables. Thanks to all who
knowingly or unknowingly helped.

When I run my main form and several child forms within it from the VFP6
development environment, they all work fine, and exit into the command
window when I quit.

My final issue is probably a trivial one but is very frustrating. I have a
Main program that exists primarily to do some startup initializing of the
databases and launch the main form, sfEditor. I call the form:

do form sfEditor
read events

The problem comes when I want to quit the program. Exiting the form (using
the standard wizbtns.vbx buttongroup) I end up with an empty window (main)
that I've created as a container for the child forms. If I include code to
release that window, I end up with a blank window. If I close that window
manually, I get a blank VFP screen that won't close (I have to ctrl-alt-del
and wait for it to timeout before I can close it).

I've tried the kitchen sink approach, throwing in every bit of cleanup code
I can figure out:

CLEAR EVENTS
CLOSE DATA
CLOSE ALL
RELEASE ALL EXTENDED
CLOSE WINDOW main
DEACTIVATE WINDOW main
CLEAR ALL
SET CLASSLIB TO
CLEAR PROGRAM
CLEAR ALL
CLEAR
ON SHUTDOWN
ON ERROR

What am I missing?

TIA.

Randy


FRANCK GmbH

unread,
Apr 6, 2001, 3:04:59 AM4/6/01
to Congenital Kano
Congenital Kano schrieb:


Hallo Randy

try

ON SHUTDOWN QUIT
before(!!!) your command
READ EVENTS

Greetings, LUTZ

Cyrus Welch

unread,
Apr 6, 2001, 12:01:55 PM4/6/01
to
Have you tried CLEAR EVENTS?

--
Cy Welch
89 RS 5.0 TBI, its not fast, but its still fun.
67 C10 Shortbed Stepside
"Congenital Kano" <jrs...@home.com> wrote in message
news:TCaz6.6237$4L4.6...@news1.frmt1.sfba.home.com...

Congenital Kano

unread,
Apr 7, 2001, 2:03:08 AM4/7/01
to
That did the trick!

Thanks.

Randy

"FRANCK GmbH" <Fra...@Franck.Hagen.de> wrote in message
news:3ACD6A9B...@Franck.Hagen.de...

Michael Drozdov

unread,
Apr 7, 2001, 6:14:01 AM4/7/01
to
Hi Congenital Kano.

As addition :-) [from FAQ on my site]

Question: Cannot Quit VFP-application by [x]. How to overcome it?
Answer: See. ID: Q172455, Q110970, ON SHUTDOWN in MSDN. As adding, if you
wish, that your application was normally finished on closing OS
[CTRL+ALT+DELETE], add into end of your procedure MyCleanUp, called on an
event ON SHUTDOWN, something similarly to following:

PROCEDURE MyCleanUp
ON SHUTDOWN
...
IF VERSION (2) = 0
QUIT
ENDIF

Best regards.
Michael Drozdov, ICS Soft, Perm, Russia
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mailto:Dro...@ics.perm.su
My Page: http://vfpdmur.narod.ru/
ICS Page: http://ics.perm.ru/ [on Russian]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Congenital Kano <jrs...@home.com> сообщил в новостях
следующее:w4yz6.8807$4L4.9...@news1.frmt1.sfba.home.com...

Congenital Kano

unread,
Apr 8, 2001, 5:49:50 PM4/8/01
to
Spacebo, Michael!

Randy

"Michael Drozdov" <Dro...@ics.perm.su> wrote in message
news:uGjcQM0vAHA.2056@tkmsftngp05...

Cy Welch

unread,
Apr 11, 2001, 9:40:14 PM4/11/01
to
You also might try putting in that code THISFORM.RELEASE().

--

Cy Welch
Senior Programmer/Analyst
MetSYS Inc.
http://www.metsysinc.com


"Congenital Kano" <jrs...@home.com> wrote in message

news:w4yz6.8807$4L4.9...@news1.frmt1.sfba.home.com...

0 new messages