在Delphi 7 怎样做一个飞屏窗口(快闪窗口,用来启动应用程序前显示版本信息的窗口)及怎样控制显示时间的长短(如显示5秒)????(希望有全代码!!!!)我在工程文件中是如下做的,但飞屏窗口显示得太快,看不清楚!!!!(怎样控制显示时间的长短!!???)
////////////////////////////////////////////////program splashProject;uses
Forms,
unitMain in 'unitMain.pas' {FrmMain},
unitSplash in 'unitSplash.pas' {frmSplash};{$R *.res}begin
Application.Initialize;
frmSplash := TfrmSplash.Create(Application);
frmSplash.Show;
frmSplash.Update;
Application.Title := 'this is a splash Form!!!!!';
Application.CreateForm(TFrmMain, FrmMain);
frmSplash.Hide;
//frmSplash.Update;
frmSplash.Free; Application.Run;
end.//////////////////////////////////////////////////
////////////////////////////////////////////////program splashProject;uses
Forms,
unitMain in 'unitMain.pas' {FrmMain},
unitSplash in 'unitSplash.pas' {frmSplash};{$R *.res}begin
Application.Initialize;
frmSplash := TfrmSplash.Create(Application);
frmSplash.Show;
frmSplash.Update;
Application.Title := 'this is a splash Form!!!!!';
Application.CreateForm(TFrmMain, FrmMain);
frmSplash.Hide;
//frmSplash.Update;
frmSplash.Free; Application.Run;
end.//////////////////////////////////////////////////
Form2 := TForm2.Create(Application);
Form2.ShowModal;
Application.Title := 'this is a splash Form!!!!!';
Application.CreateForm(TForm1, Form1);
Application.Run;
$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Timer1.interval := 10000;
procedure TForm2.Timer1Timer(Sender: TObject);
begin
Close;
end;
1、下面是引導程序
program Project_FL;
uses
Forms,
Windows,
FrmFlash in 'Common\FrmFlash.pas' {Form_flash};
const
Appname='flsystem';
var
RvHandle:hWnd;
{$R *.res}
begin
RvHandle:=FindWindow(AppName,NIL);
if RvHandle>0 then
exit; Form_flash:=TForm_flash.create(Application);
Form_flash.show;
Form_flash.Update ;
Application.Initialize;
Application.Title := ';
Application.HelpFile := ';
Application.CreateForm(TfrmMain, frmMain);
Form_flash.free;
Application.Run;
end.
2、快閃窗口
unit FrmFlash;interfaceuses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, jpeg, ExtCtrls;type
TForm_flash = class(TForm)
Image2: TImage;
procedure FormHide(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form_flash: TForm_flash;implementation{$R *.DFM}procedure TForm_flash.FormHide(Sender: TObject);
var i:integer;
begin
{i:=0;
while i<50000 do
i:=i+1;}
也可以加時鐘控制。
end;end.
fxjpost(天外有天)
这你的这个好像太复杂了,好否简单一点!!!??(不过也说一声多谢!!)大家可否有一些简单的方法(可否列出全代码!!!??)
procedure TMainForm.FormShow(Sender: TObject);
begin
SplashForm.ShowModal;
SplashForm.Timer1Timer(Sender);
end;procedure TSplashForm.Timer1Timer(Sender: TObject);
begin
//***********************************喷屏显示*******************************//
Gauge1.Progress:=Gauge1.Progress+1;
if Gauge1.Progress=100 then
begin
SplashForm.Close;
MainForm.Show;
end;
end;
具体怎样做(全代码来看一看???)
SplashForm.Close;语句前面少了一句Timer1.Enabled:=False;
Gauge在samples页面,这里当进度条用,显示还要等待多少时间。
1、楼主叫programEasy(森重宽)
2、森重宽好像是篮球飞人里面,樱木花道去那个什么县看预选赛时,那个打完比赛离开体育馆时把樱木花道撞了个跟头的那个目无表情的大块头吧(名朋工业队的中锋)?
完整代码????????
建立一个新Application,包括两个Form,其中Form1为主窗口,Form2为要显示的图片Form,不妨将Form2的边框类型设为无,同时在Form2中加入一个TImage类的构件Image1,Align属性为Client,AutoSize设为True,然后为Image1指定任意一个图片。
选Project1/Options菜单,点取Application页,将Form2从左边列表框中移到右边列表框,这样Project1.dpr源程序就不会生成建立Form2的代码。下一步是手工修改Project1.DPR源代码,因为Form2应该在Form1之前建立并显示,但不能使用Application的CreateForm方法(第一个用此方法建立的Form被认为是主Form),具体的代码如下,当运行至Application.CreateForm(...)一行时Form2已经建立并显示出来,然后该行建立主Form并激发主Form的OnCreate事件,你可以在OnCreate事件处理过程中完成你的初始化工作。Project1.dpr program Project1;uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};{$R *.RES}begin
Application.Initialize; {程序初始化}
Form2 := TForm2.Create(Application); {建立徽标Form}
Form2.Show; {显示徽标Form}
Form2.Update; {重画徽标Form,确保其中的图片被显示出来}
Application.CreateForm(TForm1, Form1); {建立主Form}
Form2.Hide; {隐藏徽标Form,使主Form显示出来}
Form2.Free; {释放徽标Form占用的资源}
Application.Run; {程序运行}
end.
Windows, Messages, SysUtils,
Classes, Graphics, Controls,
Forms, ExtCtrls;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
public
end;var
Form1: TForm1;implementation{$R *.DFM}{ OnCreate事件处理过程,延时五秒 }
procedure TForm1.FormCreate(Sender: TObject);
var
CurrTime: TSystemTime;
Sec: Word;
begin
GetSystemTime(CurrTime);
Sec := CurrTime.wSecond + 5;
while Sec>CurrTime.wSecond do
GetSystemTime(CurrTime);
end;end.
执行这个程序,会看到令人满意的效果:启动画面成功地显示出来,而且当鼠标移至画面上时会自动变成沙漏形状,五秒钟后画面消失,主窗口出现。
通过尝试终于做到了!!!!!(多谢提供帮助的朋友!!!!!)
可行方法如下:1。调用sleep过程完行时间延时
program splashProject;uses
SysUtils, //调用sleep过程要用这个单元
Forms,
unitMain in 'unitMain.pas' {FrmMain},
unitSplash in 'unitSplash.pas' {frmSplash};{$R *.res}
// var
// i:integer;
begin
Application.Initialize;
frmSplash := TfrmSplash.Create(Application);
frmSplash.Show;
// i:=0;
// for i:= 0 to 100000000 do
frmSplash.Update;
sleep(4000); //4000表示4秒,他的单位为毫秒
Application.Title := 'this is a splash Form!!!!!';
Application.CreateForm(TFrmMain, FrmMain);
frmSplash.Hide;
frmSplash.Update;
frmSplash.Free;
Application.Run;
end.
////////////////////////////////////////////
现在开发ERP,CRM,MIS系统用那些数据引擎好??????(有什么方案!!!)
请大家说一说!!!???
现在开发ERP,CRM,MIS系统用那些数据引擎好??????(有什么方案!!!)
请大家说一说!!!???