如何制作喷射屏幕(50分)

  • 主题发起人 主题发起人 mocun98
  • 开始时间 开始时间
M

mocun98

Unregistered / Unconfirmed
GUEST, unregistred user!
小第初来乍道,想请教如何制作喷射屏幕,如何控制其显示时间,又如何给喷射屏幕加上特效!!
以上问题,能者指点其一就可以!
谢谢!!!!
 
unit Main;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;

type
TMainForm = class(TForm)
ExitButton: TButton;
procedure ExitButtonClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
MainForm: TMainForm;

implementation

{$R *.DFM}

procedure TMainForm.ExitButtonClick(Sender: TObject);
begin
Close;
end;

procedure TMainForm.FormCreate(Sender: TObject);
var
stopTime:LongInt;
begin
stopTime:=GetTickCount div 1000;
while ((GetTickCount div 1000)<(stopTime+2)) do
Sleep(1);
end;

end.
========================================
========================================
unit Splash;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, jpeg;

type
TSplashForm = class(TForm)
Bevel1: TBevel;
Image1: TImage;
private
{ Private declarations }
public
{ Public declarations }
end;

var
SplashForm: TSplashForm;

implementation

{$R *.DFM}

end.
 
program Project1;

uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit3 in 'Unit3.pas' {Form3};

{$R *.res}

begin
Form3:=TForm3.Create(Application);
Form3.Show;
Form3.Update;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
谢谢回答问题,我是弄明白了。
不过上面的代码,还要加入在工程文件里。
还希望有人能解决其他问题
 
在TForm3上放一个定时器,响应Form的OnShow事件,
procedure TForm3.OnShow;
begin
Timer1.Enabled := true;
end;

设定定时器的触时间Interval为窗体显示的时间,响应定时器的触发事件,
procedure TForm3.Timer1Tick;
begin
close;
end;

响应窗体的OnClose事件,关闭时释放窗体:
procedure TForm3.OnClose;
begin
Action := caFree;
end;

特效可以用Gif或者Flash等控件,显示动画效果。
 
谢谢指点[:)]
 

Similar threads

后退
顶部