const Count = 2; Classes: array[0..Count - 1] of TFormClass = (TForm2, TForm3); var I: Integer; begin for I := 0 to Count - 1 do if Classes[I].Name = Table1.FieldByName('FormName').AsString then with TForm(Classes[I].Create(Self)) do try ShowModal; Break; finally Free; end; end;
application.createform(Tform2,form2);
form2.showmodal;
form2.free;
Count = 2;
Classes: array[0..Count - 1] of TFormClass =
(TForm2, TForm3);
var
I: Integer;
begin
for I := 0 to Count - 1 do
if Classes[I].Name = Table1.FieldByName('FormName').AsString then
with TForm(Classes[I].Create(Self)) do try
ShowModal;
Break;
finally
Free;
end;
end;
uses
TypInfo;
{GetPropStr().....}
谢谢!
var
TmpForm:TForm;
begin
TmpForm := TForm.Create(nil);
with TmpForm do
begin
Name := //你从你的数据库里面取出来的Frm名字;
Caption := 'sssss';
Height:= 20;
Width:= 60;
Left:= MXPos;
Top:= MYPos;
..等属性
end;
TmpForm.Show;
end;