unit Unit8;interfaceuses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ComCtrls, jpeg, ExtCtrls;type
  Tloading = class(TForm)
    Image1: TImage;
    ProgressBar1: TProgressBar;
    Label4: TLabel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Timer1: TTimer;
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;var
  loading: Tloading;implementation{$R *.dfm}procedure Tloading.Timer1Timer(Sender: TObject);
beginend;end.
請就上面的代碼進行修改

解决方案 »

  1.   

    先将Timer1的Interval属性设置成4000,然后在上面的代码中隐藏闪屏,显示主界面就可以了,最后还要Timer1.Enabled := False;
      

  2.   

    在dephi 5 开发人员指南 上有介绍,自己去看。
      

  3.   

    在显示启动画面时把主窗口设为不可见的,执行完Timer1后把主窗口显示出来
      

  4.   

    我要有delphi5我還來這裡問???
     Little2000(Rainy) ,是這樣嗎/?
    procedure Tloading.Timer1Timer(Sender: TObject);
    begin
    timer1.interval:=4000;
    timer1.enabled:=false;
    end;可是還是不行阿
      

  5.   

    何必用timer呢?直接sleep(4000)就可以了啊
      

  6.   

    hkbarton(宁静至远||淡泊明志) sleep(4000)應該放哪呢'///???
    請明示.
      

  7.   

    在工程文件中:
    begin
    Mutex:=CreateMutex(NIL,True,'SingleApp'); 
    IF GetLastError<>ERROR_ALREADY_EXISTS THEN
    Begin
           Application.Initialize;
           formwellcome:=tformwellcome.Create(formwellcome);
           formwellcome.Show;
           
           sleep(4000);Application.CreateForm(TDM1, DM1);
      Application.CreateForm(TFormjxcMaster, FormjxcMaster);
      Application.CreateForm(TFormlogin, Formlogin);
      formwellcome.Hide ;
           formwellcome.Free ;
           formlogin.ShowModal ;
           if formlogin.ModalResult=1 then
           Application.Run;
    end;
    ReleaseMutex(Mutex);
      

  8.   

    編譯結果說sleep未申明.
    program Project1;uses
      Forms,
      Unit1 in 'Unit1.pas' {mainfrm},
      Unit2 in 'Unit2.pas' {manage},
      Unit3 in 'Unit3.pas' {chaxun},
      Unit4 in 'Unit4.pas' {xiugaimima},
      Unit5 in 'Unit5.pas' {addbeipin},
      Unit6 in 'Unit6.pas' {chaxunnew},
      Unit7 in 'Unit7.pas' {modify},
      Unit8 in 'Unit8.pas' {loading};{$R *.res}begin
      Application.Initialize;
      loading:=Tloading.create(loading);
      loading.show;
      
    sleep(4000);  loading.update;
      Application.CreateForm(Tmainfrm, mainfrm);
      loading.progressbar1.position:=15;
      Application.CreateForm(Tchaxun, chaxun);
      loading.progressbar1.position:=50;
      Application.CreateForm(Taddbeipin, addbeipin);
      loading.progressbar1.position:=55;
      Application.CreateForm(Tmodify, modify);
      loading.progressbar1.position:=75;
      Application.CreateForm(Txiugaimima, xiugaimima);
      loading.progressbar1.position:=90;
      Application.CreateForm(Tchaxunnew, chaxunnew);
      loading.progressbar1.position:=100;
      Application.CreateForm(Tmanage, manage);
      loading.hide;
      loading.free;
      Application.Run;
    end.
      

  9.   

    為什麼要讓它停幾秒呀,讓他裝載完了就可以了嘛
    begin
      Application.Initialize;
      loading:=Tloading.create(loading);
      loading.show;
      loading.update;
      Application.CreateForm(Tmainfrm, mainfrm);
      loading.progressbar1.position:=15;
      Application.CreateForm(Tchaxun, chaxun);
      loading.progressbar1.position:=50;
      Application.CreateForm(Taddbeipin, addbeipin);
      loading.progressbar1.position:=55;
      Application.CreateForm(Tmodify, modify);
      loading.progressbar1.position:=75;
      Application.CreateForm(Txiugaimima, xiugaimima);
      loading.progressbar1.position:=90;
      Application.CreateForm(Tchaxunnew, chaxunnew);
      loading.progressbar1.position:=100;
      Application.CreateForm(Tmanage, manage);
      loading.hide;
      loading.free;
      Application.Run;
    end.
      

  10.   

    為什麼要讓他停幾秒,讓他裝載完了就可以了嘛
    program Project1;uses
      Forms,
      Unit1 in 'Unit1.pas' {mainfrm},
      Unit2 in 'Unit2.pas' {manage},
      Unit3 in 'Unit3.pas' {chaxun},
      Unit4 in 'Unit4.pas' {xiugaimima},
      Unit5 in 'Unit5.pas' {addbeipin},
      Unit6 in 'Unit6.pas' {chaxunnew},
      Unit7 in 'Unit7.pas' {modify},
      Unit8 in 'Unit8.pas' {loading};{$R *.res}begin
      Application.Initialize;
      loading:=Tloading.create(loading);
      loading.show;
      loading.update;
      Application.CreateForm(Tmainfrm, mainfrm);
      loading.progressbar1.position:=15;
      Application.CreateForm(Tchaxun, chaxun);
      loading.progressbar1.position:=50;
      Application.CreateForm(Taddbeipin, addbeipin);
      loading.progressbar1.position:=55;
      Application.CreateForm(Tmodify, modify);
      loading.progressbar1.position:=75;
      Application.CreateForm(Txiugaimima, xiugaimima);
      loading.progressbar1.position:=90;
      Application.CreateForm(Tchaxunnew, chaxunnew);
      loading.progressbar1.position:=100;
      Application.CreateForm(Tmanage, manage);
      loading.hide;
      loading.free;
      Application.Run;
    end.
      

  11.   

    var    time1: Tdatetime;
    begin
      Splash_Form:=TSplash_Form.Create(nil);
      Splash_Form.Show;
      Splash_Form.Update;
      time1:=now;
      repeat until time1+StrToTime('00:00:1')<=now;
      //延时1S,可以定义启动画面延时的时间,
      //当所有的窗体装载完成后,创建主窗口。
      Application.Initialize;
      Application.CreateForm(TMainForm, MainForm);
      

  12.   

    在工程文件中:
    uses SysUtils;
    在Application.Initialize;后面加上
    sleep(4000);