mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:29:36 +02:00
ide: splasform use CreateForm
This commit is contained in:
parent
872608c382
commit
4ffb33a0bc
@ -137,11 +137,8 @@ begin
|
|||||||
if Application.Terminated then exit;
|
if Application.Terminated then exit;
|
||||||
|
|
||||||
// Show splashform
|
// Show splashform
|
||||||
if ShowSplashScreen then begin
|
if ShowSplashScreen then
|
||||||
SplashForm := TSplashForm.Create(nil);
|
Application.CreateForm(TSplashForm,SplashForm);
|
||||||
SplashForm.Show;
|
|
||||||
Application.ProcessMessages; // process splash paint message
|
|
||||||
end;
|
|
||||||
|
|
||||||
TMainIDE.Create(Application);
|
TMainIDE.Create(Application);
|
||||||
if not Application.Terminated then
|
if not Application.Terminated then
|
||||||
|
@ -51,6 +51,8 @@ type
|
|||||||
procedure ImagePaint(Sender: TObject);
|
procedure ImagePaint(Sender: TObject);
|
||||||
private
|
private
|
||||||
procedure LoadSplash;
|
procedure LoadSplash;
|
||||||
|
protected
|
||||||
|
procedure DoFirstShow; override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -103,6 +105,11 @@ begin
|
|||||||
SplashForm := nil;
|
SplashForm := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSplashForm.Show;
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSplashForm.ApplicationOnIdle(Sender: TObject; var Done: boolean);
|
procedure TSplashForm.ApplicationOnIdle(Sender: TObject; var Done: boolean);
|
||||||
begin
|
begin
|
||||||
Hide;
|
Hide;
|
||||||
@ -127,9 +134,9 @@ begin
|
|||||||
Image.Picture.LoadFromResourceName(hInstance, 'splash_logo', TPortableNetworkGraphic);
|
Image.Picture.LoadFromResourceName(hInstance, 'splash_logo', TPortableNetworkGraphic);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSplashForm.Show;
|
procedure TSplashForm.DoFirstShow;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited DoFirstShow;
|
||||||
|
|
||||||
LoadSplash;
|
LoadSplash;
|
||||||
ScaleImg(Image.Picture.Bitmap, Width, Height);
|
ScaleImg(Image.Picture.Bitmap, Width, Height);
|
||||||
|
Loading…
Reference in New Issue
Block a user