小
小学生_hjz
Unregistered / Unconfirmed
GUEST, unregistred user!
这是一个软件封面图片制作的例子,以下是书上的源代码划线处的语句不明白什么意思.还有把该处语句去掉运行效果相同不知道是为什么?希望高人指点!
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, jpeg;
type
Tsplashform = class(TForm)
Image1: TImage;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
splashform: Tsplashform;
implementation
{$R *.dfm}
procedure Tsplashform.Timer1Timer(Sender: TObject);
begin
timer1.Enabled:=false;
[red]--------------------------[/red]
close;
end;
procedure Tsplashform.FormShow(Sender: TObject);
begin
setwindowpos(handle,hwnd_topmost,0,0,0,0,swp_nomove or swp_nosize);
end;
end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, jpeg;
type
Tsplashform = class(TForm)
Image1: TImage;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
splashform: Tsplashform;
implementation
{$R *.dfm}
procedure Tsplashform.Timer1Timer(Sender: TObject);
begin
timer1.Enabled:=false;
[red]--------------------------[/red]
close;
end;
procedure Tsplashform.FormShow(Sender: TObject);
begin
setwindowpos(handle,hwnd_topmost,0,0,0,0,swp_nomove or swp_nosize);
end;
end.