How to let my ini file determine whether to show a splash screen?
Posted on 2006-07-15
I want the user to be able to control whether a splashscreen is shown or not. THis shoudl be done by means of a checkbox in the application in conjunction with an inifile. Now this is what I have >
property ShowSplash: Boolean read FShowSplash write FShowSplash;
procedure TForm1.FormCreate(Sender: TObject);
Ini := TIniFile.Create( ChangeFileExt( Application.ExeName, '.INI' ) );
Ini.ReadBool('GUI','ShowSplash', False) then
ShowSplash := False else
ShowSplash := True;
procedure TForm1.FormShow(Sender: TObject);
if ShowSplash then
// end of code
Delphi's complaint:[Error] Main.pas(61): This form of method call only allowed for class methods. Now my guess would be that I'm doing something terribly wrong so my question is what am I doing wrong here?
Any other approaches are welcome as well ofcourse, as long as teh user is able to control whether the splash screen pops up or not.
Regards Paul :)
Ps thanks in advance and please comment as much as possible.