我想在程序开始以前先显示一个窗口,它有各种说明文字但是我如下写出的程序显示的
窗口是一片空白请问怎么回事??program Project1;uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};{$R *.res}begin
Application.Initialize;
Form2 := TForm2.Create(Application );
Form2.Show;
Application.CreateForm(TForm1, Form1);
Form2.Hide;
Form2.Free;
Application.Run;
end. 先显示窗口如下:
object Form2: TForm2
Left = 211
Top = 164
Cursor = crHourGlass
BorderStyle = bsNone
Caption = 'Form2'
ClientHeight = 338
ClientWidth = 494
Color = clBtnFace
Enabled = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 56
Top = 120
Width = 379
Height = 33
Caption = '桂林分公司'
Font.Charset = DEFAULT_CHARSET
Font.Color = clHotLight
Font.Height = -24
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label2: TLabel
Left = 152
Top = 208
Width = 191
Height = 24
Caption = 'A DEMO PROGRAM'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label3: TLabel
Left = 160
Top = 48
Width = 153
Height = 24
Caption = '欢迎光临本工作室'
Font.Charset = DEFAULT_CHARSET
Font.Color = clRed
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
end 我已在主窗口中使用了延时。
Win98 + Delphi7
窗口是一片空白请问怎么回事??program Project1;uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Unit2 in 'Unit2.pas' {Form2};{$R *.res}begin
Application.Initialize;
Form2 := TForm2.Create(Application );
Form2.Show;
Application.CreateForm(TForm1, Form1);
Form2.Hide;
Form2.Free;
Application.Run;
end. 先显示窗口如下:
object Form2: TForm2
Left = 211
Top = 164
Cursor = crHourGlass
BorderStyle = bsNone
Caption = 'Form2'
ClientHeight = 338
ClientWidth = 494
Color = clBtnFace
Enabled = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 56
Top = 120
Width = 379
Height = 33
Caption = '桂林分公司'
Font.Charset = DEFAULT_CHARSET
Font.Color = clHotLight
Font.Height = -24
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label2: TLabel
Left = 152
Top = 208
Width = 191
Height = 24
Caption = 'A DEMO PROGRAM'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
object Label3: TLabel
Left = 160
Top = 48
Width = 153
Height = 24
Caption = '欢迎光临本工作室'
Font.Charset = DEFAULT_CHARSET
Font.Color = clRed
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
end
end 我已在主窗口中使用了延时。
Win98 + Delphi7
Application.Initialize;
Form2 := TForm2.Create(Application );
Form2.Showmodal;
form2.release;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
我是在这个出口中加了一个timer空间,在ontimer事件中写的如下时间。
这样启动程序后,这个画面能停留4秒。然后进入主程序
if timer1.Interval=4000 then
begin
timer1.enabled:=false;
close;
end;