Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Top level form only flashes and disappears
Message
 
To
05/03/2008 20:38:21
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01295706
Message ID:
01299275
Views:
13
Tracy,
I haven't go that far yet but I guess I had better take that into consideration. I found the fix quite by accident. The reason for the object reference in the main form is to allow the user to jump to any open form from a picklist in the main form. The idea is for the CurrentForm property to wind up being an array of objects for the picklist. When I went back to try and fix the problem with starting the form from the system menu the basted thing worked! That's when I commented out the line setting the form object in the main form and found it was the fix.

>:o) Glad you got it worked out! Do you have to set it back when you close the form?
>
>
>>UPDATE:
>>I in the modeless form GotFocus event I put:
xoMainForm.CurrentForm = Thisform
where CurrentForm is a new property in the main form and xoMainForm is a public var for the main form object. Once I did that the form loads and stays. If I comment that line out of the gotfocus the form flashes and is gone. It sure looks like my problem was as I explained below.
>>Thanks again to both of you for the help.
>>John.
>>
>>>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.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform