写好的程序有两个登陆界面,我只想显示一个,该怎么做啊,有两个mainform

解决方案 »

  1.   

    删掉一个或者都做成动态的显示,自己根据什么条件只Create显示其中一个
      

  2.   

    在delphi->project->option->forms页左侧设置你的第一个启动窗口就好了,其它移动到右边
      

  3.   

    首先不能用登录窗口作为主窗口begin
          Application.Initialize;
          Application.MainFormOnTaskbar := True;
          Application.Title :='XXXXXXXXXXXX';
          splashFM:=TsplashFM.Create(nil);
          
          splashFM.Show;
      
          splashFM.Update;
          if 你的条件
          LoginFM :=TLoginFM1.Create(nil) else
          LoginFM :=TLoginFM2.Create(nil) ;
          if LoginFM.ShowModal <>1 then
          begin
            splashFM.Update;
            splashFM.Free;
            LoginFM.Free;
            Application.Terminate;
            Exit;
          end ;  
           splashFM.Free;  
               Application.CreateForm(TMtnPhoneTest, MtnPhoneTest);      Application.Run;
    end.
    其中LoginFM : TForm      LoginFM :=TLoginFM1.Create(nil)
          LoginFM :=TLoginFM2.Create(nil)
    是用你的不同的LoginFM来构建LoginFM。
    类的多态
      

  4.   

    其实 多看看别人的demo 就明白了