(1)在欢迎界面(welcome单元)中添加时钟控件Timer1,设置恰当的interval值,并在其OnTimer事件中添加如下代码:
procedure TfrmWelcome.Timer1Timer(Sender: TObject);
begin
frmWelcome.Close;
Timer1.Enabled:= false;
end;
(2)在工程文件中创建主form的代码之前,添加如下代码:
frmWelcome:= TfrmWelcome.Create(Application);
frmWelcome.Show;
frmWelcome.Update;
while frmWelcome.Timer1.Enabled = true do
begin
Application.ProcessMessages;
end;
frmWelcome.Free;