我想在我的主程序运行之前添加一个启动窗口,请问怎样做?谢过

解决方案 »

  1.   

    在project中把你要启动的窗体放在主窗体之前创建。
      

  2.   

    1.frmFlash.pas:
    //Timer1.Interval 为3000,意为显示3秒
    unit flash;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, ExtCtrls, jpeg, StdCtrls;type
      Tfrmflash = class(TForm)
        Image1: TImage;
        Timer1: TTimer;
        Timer2: TTimer;
        Label1: TLabel;
        procedure Timer1Timer(Sender: TObject);
        procedure Timer2Timer(Sender: TObject);
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      frmflash: Tfrmflash;implementation{$R *.dfm}procedure Tfrmflash.FormCreate(Sender: TObject);
    begin
      label1.Caption := '系统启动中.';
    end;procedure Tfrmflash.Timer1Timer(Sender: TObject);
    begin
      frmflash.ModalResult := mrok;
    end;procedure Tfrmflash.Timer2Timer(Sender: TObject);
    begin
      label1.Caption := label1.Caption + '.';
    end;  end.2.工程文件:
    program Pro01;uses
      Forms,
      Controls,
      test01 in 'test01.pas' {frmmain},
      flash in 'flash.pas' {frmflash};{$R *.res}begin
      Application.Initialize;
      frmflash := Tfrmflash.Create(Application);
      frmflash.ShowModal;
      if (frmflash.ModalResult = mrok) then
      begin
        Application.Title := '测试Splash窗体';
        Application.CreateForm(Tfrmmain, frmmain);
        frmflash.Hide;
        frmflash.Release;
        Application.Run;
      end;
    end.
      

  3.   

    weizi2000(秋风啊) 写的很详细了,你就那么写就可以了