Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Just need a clarification on how a form is run
Message
From
20/08/1999 20:09:00
 
 
To
20/08/1999 13:20:58
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00255696
Message ID:
00256124
Views:
15
>My form appears and then dissapears immediately.

If the form is modal (if you've set the Form's WindowType property to 1), then the odds are that there are no active controls, or that the Init is returning a .F. and you've shown the form within the Init event.

The code fragment you've shown, where you effectively DO FORM bletch and then immediately issue a READ EVENTS should work. You can confirm that the form is visibile when it gets to the READ EVENTS by inserting a WAIT WINDOW for debug purposes to force VFP to pause execution before getting to the READ EVENTS. If the form disappears before the WAIT WINDOW appears, then something is closing the form before the READ EVENTS statement can take effect. Something like this might prove out the code situation:

DO FORM foo
=MESSAGEBOX("The line before READ EVENTS",16,'Form should be visible')
READ EVENTS
=MESSAGEBOX("READ EVENTS terminated",16,"Form should have disappeared")

MESSAGEBOX() is modal (nothing else should be able to happen until you close it) and a random keystroke won't close it like WAIT WINDOW might do.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform