Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem With Ending Pgm
Message
From
11/04/2014 02:29:14
 
 
To
10/04/2014 23:49:25
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01598403
Message ID:
01598487
Views:
58
>Yes, it's top level and modal, but I've tried it as top level and modeless. The same thing happens.
>Keep in mind it's now a new form with just one object on it...a cmd button that ends things.
>
>Can you think of anything else... maybe a setting in the environment?
>I've tried everything and am dead in the water right now.

Assuming you want a VFP app that comes up as a single form, with no VFP window, menu etc. here's a configuration that works for me:

1. Project...Other tab...Text Files, includes config.fpw, which in turn includes a single line: SCREEN=OFF

2. Project...Code tab...Programs, a Main.prg program (set as Main in the project). The guts of it are:

DO FORM MainForm
READ EVENTS
* with nothing after that

3. Project...Documents tab...Forms, a MainForm form. Important non-default settings:
.ShowWindow = 2 (As Top-Level Form)

* Unload method:
=DODEFAULT( )
CLEAR EVENTS

* Note that Other...WindowType = 0 (Modeless) which is the default
The result is the form as shown in the attached image. I don't even have a "Close" command button control on the form, the app is closed by clicking on the red Close button at the top right. For this app I also set .MaxButton and .MinButton to .F. which is why they don't appear on the form.

If you want a Close button on the form, I think all the code you need in its click event would be

ThisForm.Release( )

If you create a fresh project and test form as above it should work. Come to think of it your test form may need at least one control that can receive focus (not tested).
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform