我的EMAIL:zxe3tec@163.com QQ:80741274
5 个解决方案
#1
procedure TForm1.FormCreate(Sender: TObject);
#2
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
var
CurrTime: TSystemTime;
Sec: Word;
begin
GetSystemTime(CurrTime);
Sec := CurrTime.wSecond + 5;
while Sec>CurrTime.wSecond do
GetSystemTime(CurrTime);
end;
end
#3
不就是一个启动画面吗!让后面的程序 sleep(10)可以了吧记住sleep在windows单元。
#4
楼上的办法可以达到,但是一种忙等待的办法————等待的时候什么事情也做不了;
建议用timer,在timer事件里send一个退出的message。
建议用timer,在timer事件里send一个退出的message。
#5
program rsgl;
uses
Forms,
mainu in 'Mainu.pas' {main},
logu in 'LOGU.PAS' {log},
datau in 'DATAU.PAS' {data},
flashfmu in 'FLASHFMU.PAS' {flashfm},
emplistu in 'EMPLISTU.PAS' {emplist},
empoweru in 'EMPOWERU.PAS' {empower},
kxxwhu in 'KXXWHU.PAS' {kxxwh},
aboutu in 'ABOUTU.PAS' {about},
select in 'SELECT.PAS' {selectfrm},
chgpwdu in 'CHGPWDU.PAS' {chgpwd},
desk in 'desk.pas' {deskfrm},
setprint in 'SETPRINT.PAS' {printsetfrm},
zxdc_mcu in 'ZXDC_MCU.PAS' {zxdc_mx},
dwzcu in 'DWZCU.PAS' {dwzc},
ryda in 'ryda.pas' {rydafrm},
js in 'js.pas' {jsfrm},
rybd in 'rybd.pas' {rybdfrm},
lvli in 'lvli.pas' {lvlifrm},
gzbwh in 'gzbwh.pas' {gzbwhfrm},
kmsz in 'kmsz.pas' {kmszfrm},
opengz in 'opengz.pas' {opengzfrm},
kqb in 'kqb.pas' {kqbfrm},
kaoqin in 'kaoqin.pas' {kaoqinfrm},
rdjjfz in 'rdjjfz.pas' {rdjjfzfrm},
jiangli in 'jiangli.pas' {jianglifrm},
cc in 'cc.pas' {chengchufrm},
cjk in 'cjk.pas' {qtxxfrm},
func in '..\..\vcl\func\FUNC.PAS',
zcpd in 'zcpd.pas' {zcpdfrm},
px in 'px.pas' {pxfrm};
{$R *.res}
var i:integer;
begin
flashfm:=Tflashfm.create(application);//建立显示窗口并显示
flashfm.show;
flashfm.Update;
Application.Initialize;
Application.Title := '人事管理';
Application.CreateForm(Tmain, main);
Application.CreateForm(Tlog, log);
Application.CreateForm(Tdata, data);
Application.CreateForm(Tflashfm, flashfm);
Application.CreateForm(Templist, emplist);
Application.CreateForm(Tempower, empower);
Application.CreateForm(Tkxxwh, kxxwh);
Application.CreateForm(Tabout, about);
Application.CreateForm(Tselectfrm, selectfrm);
Application.CreateForm(Tchgpwd, chgpwd);
Application.CreateForm(Tdeskfrm, deskfrm);
Application.CreateForm(Tprintsetfrm, printsetfrm);
Application.CreateForm(Tzxdc_mx, zxdc_mx);
Application.CreateForm(Tdwzc, dwzc);
Application.CreateForm(Trydafrm, rydafrm);
Application.CreateForm(Tjsfrm, jsfrm);
Application.CreateForm(Trybdfrm, rybdfrm);
Application.CreateForm(Tlvlifrm, lvlifrm);
Application.CreateForm(Tgzbwhfrm, gzbwhfrm);
Application.CreateForm(Tkmszfrm, kmszfrm);
Application.CreateForm(Topengzfrm, opengzfrm);
Application.CreateForm(Tkqbfrm, kqbfrm);
Application.CreateForm(Tkaoqinfrm, kaoqinfrm);
Application.CreateForm(Trdjjfzfrm, rdjjfzfrm);
Application.CreateForm(Tjianglifrm, jianglifrm);
Application.CreateForm(Tchengchufrm, chengchufrm);
Application.CreateForm(Tqtxxfrm, qtxxfrm);
Application.CreateForm(Tzcpdfrm, zcpdfrm);
Application.CreateForm(Tpxfrm, pxfrm);
flashfm.Close;//关闭显示窗口
flashfm.Free;
//如果觉得启动太快可以在这加个循环等待!
log.showmodal;//登录窗口
if log.ModalResult=1 then
Application.Run
else
begin
for i :=screen.FormCount - 1 downto 0 do
begin
screen.Forms[i].close;
screen.Forms[i].free;
end;
Application.Terminate;
end;
end.
#1
procedure TForm1.FormCreate(Sender: TObject);
#2
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
var
CurrTime: TSystemTime;
Sec: Word;
begin
GetSystemTime(CurrTime);
Sec := CurrTime.wSecond + 5;
while Sec>CurrTime.wSecond do
GetSystemTime(CurrTime);
end;
end
#3
不就是一个启动画面吗!让后面的程序 sleep(10)可以了吧记住sleep在windows单元。
#4
楼上的办法可以达到,但是一种忙等待的办法————等待的时候什么事情也做不了;
建议用timer,在timer事件里send一个退出的message。
建议用timer,在timer事件里send一个退出的message。
#5
program rsgl;
uses
Forms,
mainu in 'Mainu.pas' {main},
logu in 'LOGU.PAS' {log},
datau in 'DATAU.PAS' {data},
flashfmu in 'FLASHFMU.PAS' {flashfm},
emplistu in 'EMPLISTU.PAS' {emplist},
empoweru in 'EMPOWERU.PAS' {empower},
kxxwhu in 'KXXWHU.PAS' {kxxwh},
aboutu in 'ABOUTU.PAS' {about},
select in 'SELECT.PAS' {selectfrm},
chgpwdu in 'CHGPWDU.PAS' {chgpwd},
desk in 'desk.pas' {deskfrm},
setprint in 'SETPRINT.PAS' {printsetfrm},
zxdc_mcu in 'ZXDC_MCU.PAS' {zxdc_mx},
dwzcu in 'DWZCU.PAS' {dwzc},
ryda in 'ryda.pas' {rydafrm},
js in 'js.pas' {jsfrm},
rybd in 'rybd.pas' {rybdfrm},
lvli in 'lvli.pas' {lvlifrm},
gzbwh in 'gzbwh.pas' {gzbwhfrm},
kmsz in 'kmsz.pas' {kmszfrm},
opengz in 'opengz.pas' {opengzfrm},
kqb in 'kqb.pas' {kqbfrm},
kaoqin in 'kaoqin.pas' {kaoqinfrm},
rdjjfz in 'rdjjfz.pas' {rdjjfzfrm},
jiangli in 'jiangli.pas' {jianglifrm},
cc in 'cc.pas' {chengchufrm},
cjk in 'cjk.pas' {qtxxfrm},
func in '..\..\vcl\func\FUNC.PAS',
zcpd in 'zcpd.pas' {zcpdfrm},
px in 'px.pas' {pxfrm};
{$R *.res}
var i:integer;
begin
flashfm:=Tflashfm.create(application);//建立显示窗口并显示
flashfm.show;
flashfm.Update;
Application.Initialize;
Application.Title := '人事管理';
Application.CreateForm(Tmain, main);
Application.CreateForm(Tlog, log);
Application.CreateForm(Tdata, data);
Application.CreateForm(Tflashfm, flashfm);
Application.CreateForm(Templist, emplist);
Application.CreateForm(Tempower, empower);
Application.CreateForm(Tkxxwh, kxxwh);
Application.CreateForm(Tabout, about);
Application.CreateForm(Tselectfrm, selectfrm);
Application.CreateForm(Tchgpwd, chgpwd);
Application.CreateForm(Tdeskfrm, deskfrm);
Application.CreateForm(Tprintsetfrm, printsetfrm);
Application.CreateForm(Tzxdc_mx, zxdc_mx);
Application.CreateForm(Tdwzc, dwzc);
Application.CreateForm(Trydafrm, rydafrm);
Application.CreateForm(Tjsfrm, jsfrm);
Application.CreateForm(Trybdfrm, rybdfrm);
Application.CreateForm(Tlvlifrm, lvlifrm);
Application.CreateForm(Tgzbwhfrm, gzbwhfrm);
Application.CreateForm(Tkmszfrm, kmszfrm);
Application.CreateForm(Topengzfrm, opengzfrm);
Application.CreateForm(Tkqbfrm, kqbfrm);
Application.CreateForm(Tkaoqinfrm, kaoqinfrm);
Application.CreateForm(Trdjjfzfrm, rdjjfzfrm);
Application.CreateForm(Tjianglifrm, jianglifrm);
Application.CreateForm(Tchengchufrm, chengchufrm);
Application.CreateForm(Tqtxxfrm, qtxxfrm);
Application.CreateForm(Tzcpdfrm, zcpdfrm);
Application.CreateForm(Tpxfrm, pxfrm);
flashfm.Close;//关闭显示窗口
flashfm.Free;
//如果觉得启动太快可以在这加个循环等待!
log.showmodal;//登录窗口
if log.ModalResult=1 then
Application.Run
else
begin
for i :=screen.FormCount - 1 downto 0 do
begin
screen.Forms[i].close;
screen.Forms[i].free;
end;
Application.Terminate;
end;
end.