function OpenPageForm(PageCtrl: TcxPageControl; AClassForm: TClass; AForm: TForm; ACaption: string): THandle;
var
I: Integer;
bool: Boolean;
begin
bool := False;
with PageCtrl do begin
for I := 0 to PageCount - 1 do begin
if SameText(Trim(Pages[i].Caption), Trim(ACaption)) then begin
bool := True;
ActivePageIndex := i;
Result := ActivePage.Tag;
end;
end;
end;
if not bool then begin
Application.CreateForm(TComponentClass(AClassForm), AForm);
//Application.CreateForm(TComponentClass(GetClass('Thomefor')),AForm);
with AForm do begin
ManualDock(PageCtrl);
Caption := ACaption;
Visible := True;
end;
with PageCtrl do begin
ActivePageIndex := PageCount - 1;
ActivePage.Tag := AForm.Handle;
Result := ActivePage.Tag;
end;
end;
end;
怎么样修改才能把AClassForm: TClass; AForm: TForm参数变成sting类型的
例如:function OpenPageForm(PageCtrl: TcxPageControl; AClassForm: string; AForm: string; ACaption: string): THandle;
下面该怎么样修改,刚学习delphi求助! 谢谢大牛们!
var
I: Integer;
bool: Boolean;
begin
bool := False;
with PageCtrl do begin
for I := 0 to PageCount - 1 do begin
if SameText(Trim(Pages[i].Caption), Trim(ACaption)) then begin
bool := True;
ActivePageIndex := i;
Result := ActivePage.Tag;
end;
end;
end;
if not bool then begin
Application.CreateForm(TComponentClass(AClassForm), AForm);
//Application.CreateForm(TComponentClass(GetClass('Thomefor')),AForm);
with AForm do begin
ManualDock(PageCtrl);
Caption := ACaption;
Visible := True;
end;
with PageCtrl do begin
ActivePageIndex := PageCount - 1;
ActivePage.Tag := AForm.Handle;
Result := ActivePage.Tag;
end;
end;
end;
怎么样修改才能把AClassForm: TClass; AForm: TForm参数变成sting类型的
例如:function OpenPageForm(PageCtrl: TcxPageControl; AClassForm: string; AForm: string; ACaption: string): THandle;
下面该怎么样修改,刚学习delphi求助! 谢谢大牛们!
解决方案 »
- fastreport做的报表存入到acess数据库的OLE对象(为长二进制数据),可我取不出来(别人存的),弹出"不支持的frf格式"?大虾们,我
- 介绍一个JAVA#JSP群,同时问一个关于如何访问网络数据库的问题,放分!
- 谁有DBGRIDEH控件写的进销存控件?
- 多语言的问题--"Property FooterSummaryItems does not exist."
- DBGrid没有ColumnCount属性,运行时期如何获得它的column总数?
- 高手入內!!!! 關於浮點型格式化的問題
- 调查一下各位用的IntraWeb的版本?来者有分.
- 一个DB文件最多能存放多少条记录?
- intraweb版本问题!求救!
- 有关用nmsmtp控件做发email程序时要安全认证如何解决?
- 请教一道算法题
- DELPHI+ACCESS查询的问题。
可以free掉,但现在我上面的函数不知道怎么修改了,求大牛帮忙修改..
----AClassForm.ClassName --得到类名AForm: TForm
----AForm.Name --得到窗体的名字
----AForm.ClassName --得到窗体的类名
begin
if getClass(AClassFormName) <> nil then
begin
................
end;
end;
initialization
RegisterClass(Tfrom1);
finalization
UnRegisterClass(Tfrom1);
end.