本文整理自网络,侵删。
实现代码:
procedure TfrmMain.OpenForm(Caption,FormClassName:string);var i:integer; sheet:TUniTabSheet;begin for i := 0 to pgeMain.PageCount-1 do begin if pgeMain.Pages[i].Caption=Caption then begin pgeMain.ActivePageIndex:=i; exit; end; end;
sheet:=TUniTabSheet.Create(Self); sheet.Closable:=True; sheet.Caption:=Caption; sheet.PageIndex:=i+1; sheet.PageControl:=pgeMain;
FCurrentFrame:=TUniFrameClass(FindClass(FormClassName)).Create(Self);
FCurrentFrame.Align:=alClient; FCurrentFrame.Parent:=sheet; pgeMain.ActivePage:=sheet;
end;
相关阅读 >>
Delphi xe5实现通过tmemorystream将一个unicodestring写入到一个unicode文本文件
Delphi 用ini记录combobox的itemindex
Delphi 移动windows开始按钮到任务栏中的任何位置
更多相关阅读请进入《Delphi》频道 >>