Lazarus
Using the Lazarus IDE => Designer => Topic started by: cazzajay on July 07, 2009, 02:55:15 pm
-
Hi all,
I am trying to put a splash screen on my project in Lazarus using the normal delphi code but it gives me an error at compilation saying
"Exception with message: failed to create win32 control, error: 1407"
Any ideas? I have posted the code I am using in the LPR here:
(I am using a non auto creating form called splashscreen with unit called "splash", which is in the uses section of the LPR.)
begin
Application.Title := 'MyProgram';
{$I MyProgram.lrs}
splashscreen.Tsplashscreen.Create(Application);
Application.initialize;
splashscreen.show;
splashscreen.update;
Application.createform(TForm1, Form1)
splashscreen.hide;
splashscreen.free;
application.run;
end;
Based on process of elimination it seems the problem is the manual creation of the splashscreen form? I have tried putting it after application.initialize but same error appears. %)
-
The Lazarus IDE has a splashscreen and you have all the sources.
So why not have a look at <lazarus>/ide/lazarus.pp ?
-
Anyway, Application.Initialize must be called before creating any form.
-
Thanks, i've figured it out - i just needed to change formstyle to splash! d'oh ;)