Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Switchboard Form Problems
Message
 
À
07/04/2004 17:02:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00893093
Message ID:
00893106
Vues:
37
This message has been marked as the solution to the initial question of the thread.
Most probably var ocpdf goes out of scope as soon as form cpdf instantiates. My guess is that var ocpdf should be public or private when form ocpdf is called.

HTH



>I have a small switchboard form that has three buttons on it. Each button opens a form. However, when I click on any of the buttons, the 2nd form is instantiated and jumps to the forefront but after instantiating itself it immediately runs the form's unload and releases the form. Focus is returned to the switchboard form and it is then the only form still available. Why would this happen?
>
>Here is code in the command button:
>
>
>PRIVATE llfound
>llfound = .F.
>FOR EACH loForm IN _VFP.FORMS
>	IF VARTYPE(loForm) = "O" AND pemstatus(loForm, "BaseClass", 5) AND loForm.BASECLASS = "Form" AND loForm.NAME != "Startup"
>		IF UPPER(loForm.NAME) = 'CPDF'
>			llfound = .T.
>			IF loForm.WindowState=1
>				loForm.LockScreen = .T.
>				loForm.WindowState = 0
>				loForm.LockScreen = .F.
>			ENDIF
>			loForm.refresh()	
>			loForm.Show(loForm.WindowType)
>		ENDIF
>	ENDIF
>ENDFOR
>IF !llfound
>        *--This runs and then form releases itself for some reason
>	DO FORM cpdf NAME ocpdf LINKED
>ENDIF
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform