程序启动时,先显示一幅图片然后进入操作界面,怎么办?(例如《金山词霸》)

解决方案 »

  1.   

    没做过。
    建议作个无边框的form,然后定时关闭。
      

  2.   

    //这个问题不难,说白了就是个启动封面,至于你的封面咋做,就仁者见仁了,好吧 !好运 
    program Project2;
    uses
      Forms,
      Unit1 in 'Unit1.pas' {Form1},
      Unit2 in 'Unit2.pas' {Splash};{$R *.res}begin
      Application.Initialize;
      Splash:=TSplash.Create(Application);   //创建Splash
      Splash.Show;                           //显示Splash
      Splash.Update;                         //更新Splash
      Application.CreateForm(TForm1, Form1);
      Splash.Free;                           //删除Splash
      Application.Run;
    end.unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Label1: TLabel;
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
    var
    CurTime:LongWord;
    DelayTime:LongWord;
    begin
    //设置延迟时间为5秒
    DelayTime:=5000;
    CurTime:=GetTickCount;
    while(GetTickCount<(CurTime+DelayTime))do;
    //在这儿可以加上应用程序的初始化过程
    end;end.
    unit Unit2;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TSplash = class(TForm)
        Label1: TLabel;
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Splash: TSplash;implementation{$R *.dfm}end.
      

  3.   

    先做一个仅有图片的Form,然后在工程文件中编写代码。
    类似以下:
    Application.Initialize;
      Application.Title := 'XXXX系统';
      try
        FromFlash := TFrmFlash.Create(Application);
        FromFlash.Show;
        Application.ProcessMessages;
      finally
        FromFlash.Close;
        FromFlash.Free;
        Application.CreateForm(TFromMain, FromMain);
        Application.Run;
      end;
      

  4.   

    也可以,在图片窗体上放一个timer控件
    由timer控制图片窗体隐藏的方式来达到效果