Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
The Child Form Disapear
When I call a form (parent) and the call the other form (child), why the child does not appear, it just fresh once and the return to parent form.
Thank you!
ObjMenu=CREATEOBJECT("FrmMenu")
ObjMenu.Show
READ EVENTS
DEFINE CLASS FrmMenu AS FORM
Caption="Menu"
Top=1
Left=12
Height=230
Width=220
AutoCenter=.T.
ADD OBJECT Option1 AS COMMANDBUTTON WITH;
Caption="Sub Program",;
Top=20, Left=40, Height=50, Width=140
ADD OBJECT Option3 AS COMMANDBUTTON WITH;
Caption="Exit",;
Top=160, Left=40, Height=50, Width=140
PROCEDURE Option1.Click
thisform.Visible=.F.
DO SubProgram
thisform.Visible=.T.
ENDPROC
PROCEDURE Option3.Click
Clear EVENTS
ENDPROC
ENDDEFINE
PROCEDURE SubProgram
ObjSubPrg=CREATEOBJECT("FrmSubPrg")
ObjSubPrg.Show
READ EVENTS
RETURN
DEFINE CLASS FrmSubPrg AS FORM
Caption="Sub Program"
Top=10
Left=10
Height=150
Width=150
ADD OBJECT CmdExit AS COMMANDBUTTON WITH;
Caption="Exit",;
Top=20, Left=40, Height=30, Width=100
PROCEDURE CmdExit.Click
thisform.release
ENDPROC
ENDDEFINE
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement