在frmmain 的onshow 中
frmsplash:=TfrmSplash.create(Self);
show;
做些事情(比如打开数据库)
frmsplash.update;
Frmsplash.free;
当然要放imagebox在frmsplash中
frmsplash:=TfrmSplash.create(Self);
show;
做些事情(比如打开数据库)
frmsplash.update;
Frmsplash.free;
当然要放imagebox在frmsplash中
解决方案 »
- 请教下谁有具体点的idhttp或者webbrowser的使用方法?
- 求助各位大侠:如何将memo中的各行列内容按照次序加入到ComboBox下拉选项框中??还有,如何从ini文件中读取相应数据到memo及ComboBox中
- 请问用ADOConnection的时候,每次打开Access文件都要求输入用户名密码,不要这个怎么设置?
- 数据统计
- 这样编程判断bitbtn的单击事件是否发生?
- 散分200(前10位)
- sql问题急救(在线等待)
- TreeView的用法
- 请教:(socket),怎么判断服务器和客户端已经连接上了呢?谢谢!
- 如何在delphi form中插入gif动画
- 各位大虾,小弟有一事相求(分不够还可以再加):如何解析一个HTML文件,然后将它用电子邮件发出去。谢谢
- 出售源代码!!!!!!!
在主程序的project中添加如下代码:
uses
unit2 in 'unit2.pas'
{$R *.res}
begin
form2:=Tform2.create(form2); //创建启动画面窗口
form2.show; //显示
form2.update;
sleep(1000); //启动画面显示时间
form2.hide; //隐藏
form2.free; //释放
运行
frmsplash:=TfrmSplash.create(Self);
show;
做些事情(比如打开数据库)
frmsplash.update;
Frmsplash.free;
当然要放imagebox在frmsplash中 上面可实现DELPHI启动时的画面的大部分,但是要注意的是TfrmSplash的borderstyle应该是bsnone,否则会有标题栏和系统菜单
for i:=1 to 10000 do ……
Forms,
Main in 'Main.pas' {MainForm},
WnSplashForm in 'WnSplashForm.pas' {SplashForm};//启动画面{$R *.res}begin
Application.Initialize;
SplashForm := TSplashForm.Create(Application);
SplashForm.Show;
SplashForm.Update;
while SplashForm.tmmainTimer.Enabled do//延迟作用
Application.ProcessMessages;
Application.CreateForm(TMainForm, MainForm);
//这里加载其他的子窗体
SplashForm.Hide;
SplashForm.Free;
Application.Run;
end.在Delphi启动快捷方式里加入 ‘-ns’‘-np’会是什么效果呢
‘-ns’是不显示启动画面‘-np’是不建立一个new的form
‘-ns’是不显示启动画面代码如下
program Splash;uses
Forms,
dialogs,sysutils,
Main in 'Main.pas' {MainForm},
WnSplashForm in 'WnSplashForm.pas' {SplashForm};{$R *.res}begin
Application.Initialize;
if uppercase(paramstr(1)) <> uppercase('-ns') then
begin
SplashForm := TSplashForm.Create(Application);
SplashForm.Show; //显示 封面
SplashForm.Update;//强制更新封面
while SplashForm.tmmainTimer.Enabled do
Application.ProcessMessages;
end;
Application.CreateForm(TMainForm, MainForm);
if SplashForm <> nil then
begin
SplashForm.Hide;
SplashForm.Free;
end;
Application.Run;
end.