这个窗体是个类,要先引用这个放类的文件,再由这个类创建一个实例,执行这个实例的show方法
假设你新窗体是叫NewForm,保存到NewForm_form.pas,NewForm_form.dfm下
在Button1的窗口下,在菜单File -> Use unit -> NewForm_form.pas
在Button1.click 下
procedure TForm1.Button1Click(Sender: TObject);
begin
application.createform(TNewForm,NewForm);
with Newform do
begin
Try
ShowModal;
finally
freeandnil(Newform);
end;
end;
end;