Solved

How to let my ini file determine whether to show a splash screen?

Posted on 2006-07-15
1
240 Views
Last Modified: 2010-04-05
Hi Wizards!

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 >

//code

private
    FShowSplash: Boolean;
    property ShowSplash: Boolean read FShowSplash write FShowSplash;
......

procedure TForm1.FormCreate(Sender: TObject);
var
  Ini: TIniFile;
begin
  Ini := TIniFile.Create( ChangeFileExt( Application.ExeName, '.INI' ) );
  try if
  Ini.ReadBool('GUI','ShowSplash', False) then
  ShowSplash := False else
  ShowSplash := True;
  finally
    TIniFile.Free;
end;
end;

.....

procedure TForm1.FormShow(Sender: TObject);
begin
if ShowSplash then
    Sleep(1000);
  fSplash.Release;
end;

// 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.
0
Comment
Question by:PeterdeB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
fdehell earned 125 total points
ID: 17113935
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Intraweb submit form as a POST request 4 351
Tembedded WB animatid gifs not animated on some pcs 2 86
how to resize animated Gif image in delphi ? 1 45
MS Access from Delphi 31 78
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question