if form1.edit1.Text='a' then form2.show else form3.show;
procedure TForm1.BitBtn1Click(Sender: TObject); VAR AFORM: TFORM; begin { make sure the classes are registered so that GetClass will work -- } { Usually, this goes in the initialization section where it is only executed once } RegisterClasses([TORDERFORM, TPOSTFORM]); AFORM := TFORM(GetClass(Edit2.Text)); AFORM.SHOW; end;
form2.show
else
form3.show;
VAR
AFORM: TFORM;
begin
{ make sure the classes are registered so that GetClass will work -- }
{ Usually, this goes in the initialization section where it is only executed once }
RegisterClasses([TORDERFORM, TPOSTFORM]);
AFORM := TFORM(GetClass(Edit2.Text));
AFORM.SHOW;
end;
如果不是,请举个例子先