启动画面最好的解决方法是什么?》 程序启动要做初始化,一般花费较长时间的,必须有个闪屏等待画面, 但要是程序一开始就创建出来的话, 就不能把它close掉,否则整个程序就结束了, 有什么好的处理流程?我最后用个大的Panel放在主程序上面,Panel上有个闪屏等待画面, 初始化结束后,Panel在隐藏,主程序界面显示。感觉很土。 各位是怎么做的?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在Application.Initialize; Application.CreateForm(TForm1, Form1); Application.ShowMainForm:=False; Application.Run;这里加上就搞定了 var StartForm:TForm1;//这个就是启动窗口begin StartForm:=TForm1.Create(nil); StartForm.Show; StartForm.Update; Application.Initialize; Application.Title := '接入网设备监控程序'; Application.CreateForm(TfrmMain, frmMain); StartForm.Close; Application.Run;end.///////////////////////这样就可以了 begin Application.Initialize; frmStart := TfrmStart.Create(nil); frmStart.Show; frmStart.Update; frmStart.timer.Enabled := true; Application.CreateForm(TfrmMain, frmMain); Application.CreateForm(TfrmVideo, frmVideo); Application.CreateForm(TfrmText, frmText); Application.CreateForm(TFrmLessonList, FrmLessonList); Application.CreateForm(TfrmListen, frmListen); Application.CreateForm(TfrmIndex, frmIndex); Application.CreateForm(TfrmDefineWord, frmDefineWord); repeat Application.ProcessMessages; until not frmStart.timer.Enabled; frmStart.Close; Application.Run;end.//启动画面需要设定一个Timer用来控制启动画面驻留的时间,另外启动画面窗口//不要加到 Auto Create 的窗口列表中type TfrmStart = class(TForm) timer: TTimer; imgStart: TImage; procedure timerTimer(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;var frmStart: TfrmStart;implementation{$R *.dfm}procedure TfrmStart.timerTimer(Sender: TObject);begin timer.Enabled := false;// Close;end;procedure TfrmStart.FormCreate(Sender: TObject);begin Timer.Enabled := true;end; Application.Initialize; Application.Title := '质量安全信息查询系统--后台维护'; Application.CreateForm(TfrmMain, frmMain); Application.CreateForm(TfrmTop, frmTop); Application.CreateForm(Tdm, dm); Application.CreateForm(TLogonFrm, LogonFrm); Application.CreateForm(TfrmUserManagement, frmUserManagement); Application.CreateForm(TfrmPartManagement, frmPartManagement); Application.CreateForm(TfrmCatalog, frmCatalog); Application.CreateForm(TfrmArticle, frmArticle); Application.CreateForm(TfrmHtmlPreview, frmHtmlPreview); Application.CreateForm(Tfrm_print, frm_print); Application.CreateForm(TfrmQSCorporationCatalog, frmQSCorporationCatalog); Application.CreateForm(TfrmQSProductType, frmQSProductType); frmtop.Show; Application.ProcessMessages; frmtop.Update; Sleep(2000); //延时 LogonFrm.ShowModal; frmtop.Hide; frmtop.Free; //释放启动封面 Application.Run; 初始化结束后,Panel在隐藏,主程序界面显示。如是这样的话,那个panel总是在后台运行着,显然浪费内存和cpu啦,不行的 adoquery ,在没提交前,如何来更新在本地内存中的数据? delphi 中如何让图片的背景是透明色的 高手进来看看。系统保护的问题 怎么样在DBGrid中代码添加记录啊? 用DELPHI写OFFICE的问题(和线程有关)——————高分提问!!答对再加100 200分在线急求用在按钮上的各种图标! 请教各位高手图形编程的问题!!!!! 如何在一个存储过程中调用另一个存储过程,共用同一个参数?在线..... 菜鸟提问 谢谢各位帮忙 以下的程序为什么报错,请说明原理 利用ACCESS数据库 实现 分布数据库 一个需要大家帮忙的问题
Application.CreateForm(TForm1, Form1);
Application.ShowMainForm:=False;
Application.Run;
这里加上就搞定了
begin
StartForm:=TForm1.Create(nil);
StartForm.Show;
StartForm.Update;
Application.Initialize;
Application.Title := '接入网设备监控程序';
Application.CreateForm(TfrmMain, frmMain);
StartForm.Close;
Application.Run;
end.
///////////////////////这样就可以了
Application.Initialize; frmStart := TfrmStart.Create(nil);
frmStart.Show;
frmStart.Update;
frmStart.timer.Enabled := true;
Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TfrmVideo, frmVideo);
Application.CreateForm(TfrmText, frmText);
Application.CreateForm(TFrmLessonList, FrmLessonList);
Application.CreateForm(TfrmListen, frmListen);
Application.CreateForm(TfrmIndex, frmIndex);
Application.CreateForm(TfrmDefineWord, frmDefineWord);
repeat
Application.ProcessMessages;
until not frmStart.timer.Enabled;
frmStart.Close; Application.Run;
end.//启动画面需要设定一个Timer用来控制启动画面驻留的时间,另外启动画面窗口//不要加到 Auto Create 的窗口列表中
type
TfrmStart = class(TForm)
timer: TTimer;
imgStart: TImage;
procedure timerTimer(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
frmStart: TfrmStart;implementation{$R *.dfm}procedure TfrmStart.timerTimer(Sender: TObject);
begin
timer.Enabled := false;
// Close;end;procedure TfrmStart.FormCreate(Sender: TObject);
begin
Timer.Enabled := true;
end;
Application.Title := '质量安全信息查询系统--后台维护';
Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TfrmTop, frmTop);
Application.CreateForm(Tdm, dm);
Application.CreateForm(TLogonFrm, LogonFrm);
Application.CreateForm(TfrmUserManagement, frmUserManagement);
Application.CreateForm(TfrmPartManagement, frmPartManagement);
Application.CreateForm(TfrmCatalog, frmCatalog);
Application.CreateForm(TfrmArticle, frmArticle);
Application.CreateForm(TfrmHtmlPreview, frmHtmlPreview);
Application.CreateForm(Tfrm_print, frm_print);
Application.CreateForm(TfrmQSCorporationCatalog, frmQSCorporationCatalog);
Application.CreateForm(TfrmQSProductType, frmQSProductType);
frmtop.Show;
Application.ProcessMessages; frmtop.Update;
Sleep(2000); //延时
LogonFrm.ShowModal;
frmtop.Hide;
frmtop.Free; //释放启动封面
Application.Run;
如是这样的话,那个panel总是在后台运行着,显然浪费内存和cpu啦,
不行的