Mega Code Archive

 
Categories / Delphi / Forms
 

MDI Forms

Title: MDI Forms Question: I'm creating dynamicaly the application from a DB table which contains the Menuitems config and Which Form to call I've also created a descendant of tForm named TAppForm where i've putted a Caller_Frm Property (String "Caller_Form_Name). Answer: When i create the form i try to pass the Parameter it doesn't pass. the code is as follows: procedure Tfrm_Main.frmCreate(p_Form_Name:String; p_Caller_Frm :String); var v_Form_Class:TFormClass; v_AppForm:TAppForm; begin v_AppForm := nil; v_Form_Class := TFormClass(FindClass('T'+p_Form_Name)); if v_Form_Class nil then if not frmExists(p_Form_Name) then Begin v_AppForm := v_Form_Class.Create(Application) as TAppForm; With v_AppForm do begin Caller_Frm := p_Caller_Frm; Align := alClient; WindowState := wsMaximized; end; frmShow(v_AppForm,'MC'); End; end; but it doesn't pass the variable. Thnx