A ja chciałem zrobić SplashScreena w DLL'ce i nie wiem dlaczego mi to nie chce działać.
Biblioteka wygląda tak
library SplashDLL;
uses
SysUtils,
Classes,
Forms,
FSplash in 'FSplash.pas' {Form1};
{$R *.res}
procedure pokaz_ekran; stdcall;
begin
Form1 := TForm1.Create(nil);
Form1.ShowModal;
Sleep(3000);
Form1.Destroy;
end;
exports
pokaz_ekran name 'pokaz_ekran';
begin
end.
No i w kodzie projektu wywołuje tą procedurke:
program Splash;
uses
Forms,
Main in 'Main.pas' {Form2};
{$R *.res}
procedure pokaz_ekran; stdcall external 'SplashDLL.dll' name 'pokaz_ekran';
begin
Application.Initialize;
pokaz_ekran;
Application.CreateForm(TForm2, Form2);
Application.Run;
end.
i problem polega na tym że się splashscreen nie zamyka. Co mam żle ??