Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Top level form only flashes and disappears
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01295706
Message ID:
01296452
Views:
14
I think I got it figured out. Our menu program works by having the each sysmenu command call a procedure that then runs a command such as do form myform. This procedure handles security, user logging, etc. It appears that whatever handle VFP is creating is then lost as soon as the menu procedure is done and returns. In other words it works the same as any other mem var created in a procedure. It's gone as soon as you return from the procedure. I tried creating a public var and running the menu command with do form myform name myvar linked where myvar has been declared public but even that does not work.

I'm sure that all I need to do is have the sysmenu commands call the form directly and setup the logging in the form base class instead.
Thanks again,
John.

>I'd say that wherever you're starting this non-modal toplevel form in your code, there is no READ EVENTS active. If there were, it wouldn't exit immediately. Sounds like all your existing forms are modal, so they don't even require a READ EVENTS.
>
>
>>Fred,
>>we start the program from a large prg that contains our standard set of procedures, about 40 or so. The modeless main form is loaded, the system menu is set(see below) then the READ EVENTS line. It seems that no matter what I do when I try to run a top level form from the system menu it immediately closes even if the menu command calls the click command on a command button on the mainform that runs the form. If I click that command button on the mainform it works. Anyway, I gave up and put icons on the form to run the top level forms and it works just fine.
>>
>>Any suggestions would be appreciated as this is a new, very small system where I can get away with buttons on the main form. Our other systems are very large with about 200 forms, all model (but we would like to change a number of them to modeless).
>>Thanks,
>>John.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform