program vivirs;uses
  Forms,
  windows,
  main in 'main.pas' {FrmMain},
  datamd in 'datamd.pas' {dm: TDataModule},
  input in 'input.pas' {Frminput},
  report in 'report.pas' {Frmreport},
  rpdetail in 'rpdetail.pas' {frmrpcard},
  find in 'find.pas' {frmfind},
  chtitle in 'chtitle.pas' {frmchtitle},
  about in 'about.pas' {frmabout},
  splash in 'splash.pas' {frmsplash};{$R *.RES}
var
    hMutex:HWND;
    Ret:Integer;
    frmsplash:Tfrmsplash;
begin
  Application.Initialize;
  Application.Title := '薇薇人事管理系统';
  hMutex:=CreateMutex(nil,False,'aaaaaa');
  Ret:=GetLastError;
  if Ret<>ERROR_ALREADY_EXISTS then begin
    frmsplash:=Tfrmsplash.create(application);
    frmsplash.Show;
    frmsplash.Update;
    Application.CreateForm(TFrmMain, FrmMain);
    Application.CreateForm(Tdm, dm);
    Application.CreateForm(TFrminput, Frminput);
    Application.CreateForm(TFrmreport, Frmreport);
    Application.CreateForm(Tfrmfind, frmfind);
    Application.CreateForm(Tfrmrpcard, frmrpcard);
    sleep(2000);
    frmsplash.Hide;
    frmsplash.Free;
    Application.Run;
  end;
end.

解决方案 »

  1.   

    工程文件里面,这里就是我的一个工程文件的代码,有用代码就这些,动态创建,然后FREE
    frmsplash:=Tfrmsplash.create(application);
        frmsplash.Show;
        frmsplash.Update;
        Application.CreateForm(TFrmMain, FrmMain);
        Application.CreateForm(Tdm, dm);
        Application.CreateForm(TFrminput, Frminput);
        Application.CreateForm(TFrmreport, Frmreport);
        Application.CreateForm(Tfrmfind, frmfind);
        Application.CreateForm(Tfrmrpcard, frmrpcard);
        sleep(2000);
        frmsplash.Hide;
        frmsplash.Free;
        Application.Run;
      

  2.   

    不好意思~还是不懂!就象是看书一样还是不懂,能不能麻烦老大发一个例子的原代码到我的信箱里啦?[email protected]
    呵呵,让你见笑了,我确时不懂,看原代码一下子就能明白了~~呵呵
      

  3.   

    第一次给你回复的就是原代码了,只要改工程文件就可以拉,动态创建splash窗体
    好了,好了,代码给你发过来吧!