如果一个交窗体,其它是子窗体,那闪屏和登陆窗体该怎么弄呢
我想必须要登陆才能进主窗体,
闪屏在登陆窗体之前显示
怎么弄呢,应该教我一下

解决方案 »

  1.   

    闪屏和登陆窗体都放在父窗体的oncreate事件中显示,一定要首先创建父窗体,因为第一个创建的窗体一旦关闭,整个程序将会退出
      

  2.   

    给你一段闪屏的源代码:
    这段程序是写在,project\view source 当中
      Application.Initialize;  frmSplash:=TfrmSplash.Create(application);
      frmSplash.Show;
      frmSplash.Update ;  Application.CreateForm(TfrmMain, frmMain);
      Application.CreateForm(TfrmLogin, frmLogin);
      Application.CreateForm(TfrmCustom, frmCustom);
      Application.CreateForm(TfrmOption, frmOption);
      Application.CreateForm(TfrmUnit, frmUnit);
      Application.CreateForm(TfrmUnit2, frmUnit2);
      Application.CreateForm(TfrmApply, frmApply);
      Application.CreateForm(TfrmSelect, frmSelect);
      Application.CreateForm(TdmStorage, dmStorage);
      Application.CreateForm(TfrmGoods, frmGoods);
      frmSplash.Hide;
      frmSplash.Free;  Application.Run;
      

  3.   

    Application Initialize;frmSplash := TfrmSplash.Create(Application);
    frmSplash.Show;
    frmSplash.Update;frmLogin := TfrmLogin.Create(Application);
    frmSplash.Hide;
    frmLogin.ShowModel;if frmLogin.Tag = 1 then   //Username and password are true
       begin
          Application.CreateForm(TfrmMain,frmMain);
          Application.Run;
       end
    else
       end;
      

  4.   

    to: SmallHand(火龍) 
    急!急!!
    请问如何将子窗体做成dll文件调用!!
      

  5.   

    Application.Initialize;  frmSplash:=TfrmSplash.Create(application);
      frmSplash.Show;
      frmSplash.Update ;  Application.CreateForm(TfrmMain, frmMain);
      Application.CreateForm(TfrmLogin, frmLogin);
      Application.CreateForm(TfrmCustom, frmCustom);
      Application.CreateForm(TfrmOption, frmOption);
      Application.CreateForm(TfrmUnit, frmUnit);
      Application.CreateForm(TfrmUnit2, frmUnit2);
      Application.CreateForm(TfrmApply, frmApply);
      Application.CreateForm(TfrmSelect, frmSelect);
      Application.CreateForm(TdmStorage, dmStorage);
      Application.CreateForm(TfrmGoods, frmGoods);
      frmSplash.Hide;
      frmSplash.Free;  Application.Run;在frmMain的OnCreate里写
      IsLogin := False;
    在frmMain的OnShow里写
    if IsLogin = False then
    begin
      frmMain.Visible := False;
      try
        frmLogin := TFrmLogin.Create(Application);
        frmLogin.showmodal;
      finally
        frmLogin.free;
      end;
    end
    else
      frmMain.visible := True;在frmLogin的Onclose里写
      IsLogin := True;
      

  6.   

    闪屏和登陆框永远不要做主窗体:http://218.56.11.178:8020/web/index.aspx-》 下载基地-》例程-经典应用-》启动窗体的制作登陆框和这个基本类似。