DELPHI (VCL及FMX[Firemonkey])启动时的欢迎窗口实现代码

VCL里面的的实现

program ZhouFamily;
 
uses
  Vcl.Forms,
  Winapi.Windows,
  FrmZhouFamilyMainU in FrmZhouFamilyMainU.pas {FrmZhouFamilyMain} ,
  SplashFormU in SplashFormU.pas {SplashForm} ,
  DmU in DmU.pas {DM: TDataModule};
 
var
  Timestart, timeend: dword;
 
begin
 
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  SplashForm := TSplashForm.Create(Application);
  SplashForm.Show;
  SplashForm.Update;
  Timestart := gettickcount;
  Application.CreateForm(TDM, DM); // 数据模块加载
  Application.CreateForm(TFrmZhouFamilyMain, FrmZhouFamilyMain); // 主窗口加载
  timeend := gettickcount;
  if timeend - Timestart < 1000 then
  begin
    sleep(1000 - (timeend - Timestart));
  end;
  SplashForm.Hide;
  SplashForm.Free;
  Application.Run;
 
end.

 

DELPHI (VCL及FMX[Firemonkey])启动时的欢迎窗口实现代码

上一篇:Android SDK Manager国内无法更新的解决方案


下一篇:delphi之完美Splash方案(在TfrmMain.FormCreate里不断调用TfrmSplash显示加载进度文字,并且及时Update显示)