在MDIFrom前运行登陆窗体!谢谢!!!
好象在program Project1中写代码,请给出原码。

解决方案 »

  1.   

    {$R *.res}begin
      Application.Initialize;
      with TSplashFrm.Create(Application) do
      try
        MakeSplash;
        Application.Title := 'XXX管理系统';
        Application.CreateForm(TMainFrm, MainFrm);
        Close;
      finally
        Free;
      end;  with TLoginFrm.Create(Application) do
      try
        ShowModal;
      finally
        Free;
        if ModalResult = mrOK then
          Application.Run
        else
          Application.Terminate;
      end;
    end.
      

  2.   

    program xxxuses
    windows,forms,main{这个是你的主窗体单元};
    begin
      splash:=tformx.create(nil);
      splash.formstyle:=fsontop;//好像是这个value,目的是设置你的splash不会被主窗体覆盖。
      splash.showm;
      splash.update;//可能是application.run没开始,消息循环也没开始,所以必须update,不确定。
    //下面是delphi自动生成的:
      application.init;
      application.createform(..);
      application.run;
    end;
    //////////////
    在主窗体单元中定义全局变量:
    var
    splash:tformx;//tformx是一个你再ide里面编辑好的窗体类,当然也要引用tformx所在单元。
    /////////////
    在主窗体onactive的时候splash.close;splash.free;
      

  3.   

    to: Snakeguo(楠) (莫等闲&up2myself) 
    TMainFrm多文档的主窗体出不来呀!
      

  4.   

    我的MIDForm是个fsMDIForm类型的窗体,在此窗体出来之前,
    要先出登陆窗体,如:frmlogin,上有两个按钮 buttonOK,buttonCancel
      

  5.   

    谢谢Snakeguo(楠) (莫等闲&up2myself) 试过了,可行,也谢谢其他朋友。