Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form won't go behind
Message
De
26/06/1997 08:56:36
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00037730
Message ID:
00037791
Vues:
31
>>>>I am using an application framework similar to the sample to launch my forms with the launchform method from the application object:
>>>> oapp.launchform("mjrdetail")
>>>>
>>>>Within the form I do:
>>>> omjrsrch = CREATE("mjrsrchfrm")
>>>> omjrsrch.show()
>>>>
>>>>If the class mjrsrchfrm is modal, it shows and becomes active, but the mjrdetail form remains on top -- it won't go behind. If the class mjrsrchfrm is modeless, it just flashes up, then disappears.
>>>>
>>>>I know I am missing something major here in how these stupid objects are supposed to work together. If someone could take pity on me as a VFP newbie and point me in the right direction, I would be greatly appreciative.
>>>>
>>>>With tears of frustration,
>>>>
>>>>Valerie
>>>
>>>What is the setting of the Always On Top property? You also need a READ EVENTS to keep the form from flashing.
>>>
>>>Craig
>>
>>Always on top is set to false.
>>
>>I don't understand -- I have a READ EVENTS in affect from the original startup program. Do I issue another one when I instantiate the new class?
>>
>>Valerie
>
>check the alwaysontop property in the calling form, not the second one. the second one must be modal or processing continues on the next line in the code in the first form.

I got similar mystery yesterday and didn't reply until solved my own problem. Initially, I had small VFP3 application containing just one form with no menu and no screen (_screen.left=-2000). When I tried to extend the app adding one more modal form (DO FORM... in cmd.click()), I saw interesting things: if I just open form, it's going Ok, but if I try to reset left/top properties (e.g. to force opening form in the center of 'parent') the form really flashes and disappears. I investigated the problem and found curious thing (bug or feature?): when VFP changes form top property it automatically 'adjusts' left property by _screen offset (-2000) and form is gone out of display! So, the only thing I had to do is always reset firstly top and then left property (just in this order). I suspect, if I would use _SCREEN.top=-5000, I had to do it in strictly opposite way.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform