我想实现 按下Button1后 出来个FORM(没有边框的那种) 然后FORM里面有个Lalel1显示WELCOME 3秒后Form渐渐消失

解决方案 »

  1.   

    WelFm:=TWelFm.Create(Application)
    WelFm.Show;WelFm不要自动动创建
    然后在WelFm里放个timer 时间间隔为3000
    timer事件里的代码为WelFm.Close;没有测试过..
      

  2.   


    var
      Test: TForm2;procedure TForm1.Button1Click(Sender: TObject);
    begin
      Test := TForm2.Create(Application);
      Test.Show;
      SetWindowLong(Test.Handle, GWL_STYLE, GetWindowLong(Test.Handle, GWL_STYLE) xor
            WS_OVERLAPPEDWINDOW);
      Timer1.Enabled := True;
    end;procedure TForm1.Timer1Timer(Sender: TObject);
    begin
      AnimateWindow(Test.Handle,1000,AW_HIDE   or   AW_BLEND);
      Test.Close;
    end;
      

  3.   


    procedure TForm1.Button1Click(Sender: TObject);
    begin
      with TForm2.Create(nil) do
      begin
        Show;
      end;
    end;form2为无边框窗体可以在form2上放置一个timer设置为3秒,然后close
      

  4.   

    无边框窗体设定
    form属性中borderstyle=bsNone
      

  5.   

    乖乖,都被你们给抢先了。dbmh的比较实在一点。入门级。呵呵
      

  6.   

    Form1:
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementationuses Unit2;{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
      with Form2 do
      begin
        ShowModal;
        Free;
      end;
    end;end.Form2:
    unit Unit2;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, ExtCtrls;type
      TForm2 = class(TForm)
        Label1: TLabel;
        Timer1: TTimer;
        procedure Timer1Timer(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form2: TForm2;
      i: Integer;implementation{$R *.dfm}procedure TForm2.Timer1Timer(Sender: TObject);  
    begin
      Inc(I);   
      if I > 2 then
        self.Close;
    end;end.