求就,急急急。。。怎样在程序中动态地创建启动画面? 去看一下Demos\Db\Mastapp\之DEMO吧。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 建一个启动封面窗体,假设为Form2,先设置好BorderIcons、BorderStyle、FormStyle、Position,接着在窗体上加入图片框、文本框,设置好后在菜单里选Project里的Options,把Form2从Auto-create forms里转到Available forms。再接着就是按Ctrl+F12键,选Project1,出现工程单元,其内容如下...Application.CreateForm(TForm1, Form1);Application.Run;.. 在Application.CreateForm(TForm1, Form1); 前加入如下语句:form2:=tform2.create(application);form2.Show;form2.Update; 然后在Application.Run;前面加入如下语句:form2.hide;form2.free; 在工程文件中修改如下: Application.Initialize; SplashForm:=TSplashForm.Create(SplashForm);//启动画面窗体 SplashForm.Show; SplashForm.Update; Application.CreateForm(TDataForm, DataForm); //以及其他窗体 SplashForm.free; Application.Run; 1.Splash单元unit SplashFrm;interfaceuses SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;type TSplashForm = class(TForm) imgSplash: TImage; lbl1: TLabel; lbl2: TLabel; lbl3: TLabel; tmMainTimer: TTimer; procedure tmMainTimerTimer(Sender: TObject); private { Private declarations } public { Public declarations } end;var SplashForm: TSplashForm;implementation{$R *.DFM}procedure TSplashForm.tmMainTimerTimer(Sender: TObject);begin tmMainTimer.Enabled := False;end;end.2。工程单元program splash;uses Forms, MainFrm in 'MainFrm.pas' {MainForm}, SplashFrm in 'SplashFrm.pas' {SplashForm};{$R *.RES}begin Application.Initialize; { Create the splash screen } SplashForm := TSplashForm.Create(Application); SplashForm.Show; // Display the splash screen SplashForm.Update; // Update the splash screen to ensure it gets drawn { This while loop simply uses the TTimer component on the SplashForm to simulate a lengthy process. } while SplashForm.tmMainTimer.Enabled do Application.ProcessMessages; Application.CreateForm(TMainForm, MainForm); SplashForm.Hide; // Hide the splash screen SplashForm.Free; // Free the splash screen Application.Run;end. 这种情况怎么办比较好? 急急急!在主窗口怎么读取另外一个窗口的数据? DELPHI里怎么用快乐报表?给分 存储过程传参数的问题??? 怎样屏蔽win2000下的ctrl+alt+del热启动键? MSComm实现传口通信的问题, TMD一本Delphi的书300块大洋 巨难的问题???如何获得一个汉字的拼音,或是他的第一个字母??? 关于WIN NT服务程序:不能在服务程序中进行读写文件吗?高手请进! 各位朋友,到哪可以找到制作中文的安装程序! 请问那里有dephi程序的下载_dephi菜鸟 急急急,字符串问题。在线等候!
...
Application.CreateForm(TForm1, Form1);
Application.Run;
..
在Application.CreateForm(TForm1, Form1); 前加入如下语句:
form2:=tform2.create(application);
form2.Show;
form2.Update;
然后在Application.Run;前面加入如下语句:
form2.hide;
form2.free;
Application.Initialize;
SplashForm:=TSplashForm.Create(SplashForm);//启动画面窗体
SplashForm.Show;
SplashForm.Update;
Application.CreateForm(TDataForm, DataForm);
//以及其他窗体
SplashForm.free;
Application.Run;
SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls;type
TSplashForm = class(TForm)
imgSplash: TImage;
lbl1: TLabel;
lbl2: TLabel;
lbl3: TLabel;
tmMainTimer: TTimer;
procedure tmMainTimerTimer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
SplashForm: TSplashForm;implementation{$R *.DFM}procedure TSplashForm.tmMainTimerTimer(Sender: TObject);
begin
tmMainTimer.Enabled := False;
end;end.
2。工程单元
program splash;uses
Forms,
MainFrm in 'MainFrm.pas' {MainForm},
SplashFrm in 'SplashFrm.pas' {SplashForm};{$R *.RES}
begin
Application.Initialize;
{ Create the splash screen }
SplashForm := TSplashForm.Create(Application);
SplashForm.Show; // Display the splash screen
SplashForm.Update; // Update the splash screen to ensure it gets drawn { This while loop simply uses the TTimer component on the SplashForm
to simulate a lengthy process. }
while SplashForm.tmMainTimer.Enabled do
Application.ProcessMessages; Application.CreateForm(TMainForm, MainForm);
SplashForm.Hide; // Hide the splash screen
SplashForm.Free; // Free the splash screen
Application.Run;
end.