ChildForm lazarus / 10-Designer ---------------------------------------------------------------------- josflix · 2010-03-26 03:12 I'm new in Lazarus. How I know if a childform (my TForm2 with FormStyle:fsMDIChilForm) was created? I've got the next code: Code: [Select]procedure TForm1.MenuItem12Click(Sender: TObject); begin   {Creamos nuevo formulario hijo}   With TForm2.Create(self) Do        begin        Inc(contador);        Caption:='Nuevo' + IntTostr(Contador);        Show();        end; end;          Now, I want to Know if TForm2 was created. ---------------------------------------------------------------------- davesimplewear · 2010-03-26 05:26 AFAIK mdi has been discontinued in lazarus, this can be simulated to some extent by using a pagecontrol or note book and dynamically creating the page as shown in the psuedo code. Code: [Select]procedure TfMain.newEditMemo(aName: string); begin  Screen.Cursor := crHourGlass;    try    //create tabsheet to hold the memo and gutter, assign to the page control    newTabsheet := TTabSheet.Create(pcEditor);    newTabsheet.Parent := pcEditor;    newTabsheet.Caption := aName;    //newTabsheet.Hint := Name;    fMain.ParentShowHint := False;    fMain.ShowHint := False;    fMain.Caption := MainCaption + newTabsheet.Caption;    newTabsheet.ImageIndex := 0;    newTabsheet.ShowHint := False;    newTabsheet.ParentShowHint := False;    newTabsheet.PageControl := pcEditor;    pcEditor.ActivePage := newTabsheet;    pcEditor.ParentShowHint := False;    // create Memo and align, set Properties    newMemo := TSynMemo.Create(newTabsheet);    newMemo.Parent := newTabsheet;    newMemo.Align := alClient;    newMemo.WantTabs := True;    newMemo.HideSelection := True;    newMemo.OnChange := @newMemoChange;    newMemo.OnDragDrop := @NewMemoDragDrop;    newMemo.OnDragOver := @NewMemoDragOver;    newMemo.ParentShowHint := False;    newMemo.ShowHint := False;    newMemo.PopupMenu := puEditor;          {If Not Assigned(newMemo.Highlighter) Then             newMemo.Highlighter := URLS; }    autoComp.Editor := newMemo;    setFonts.SynMemo := newMemo;    //TextSetup;    ActiveControl := newMemo;    newMemo.Modified := False;    finally    Screen.Cursor := crDefault;    setFonts.ReadSMemoFonts;    end; end; Regards Dave