var
  Login : TLoginForm;
begin
  Application.Initialize;
  
  Application.CreateForm(TFMain, FMain);
  Login := TLoginForm.Create(Application);
  if (Login.ShowModal=mrAbort) then
    Application.Terminate;
  Application.Run;
end.

解决方案 »

  1.   

    上面代码写到DPR文件中!
      

  2.   

    //推荐:
    http://www.csdn.net/expert/topic/410/410056.shtm
      

  3.   

    to :     liang_z(千山一刀之忍者神龟)老兄好象不行啊!
      

  4.   

    follow me,
    1.new two form(form1:unit1; form2:unit2)
    2.add two bitbtn to form2(bitbtn1<modalresult:mrok>; bitbtn2<modalresult:mrcancel>)
    3.change the project file:
    application.createform(tform1, form1);
    form2 := tform2.create(application);
    if form2.showmodal = 1 then;//this is password form
    begin
      application.run;
    end;
    4.run the project
    5.do you know?