🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #603

Re: Delphi Application Startup Problem!

#603
From: Alan Black
Date: Wed, 17 Sep 1997 00:00
38 lines
2005 bytes
In article <34201197.69F44A4A@algonet.se>, =?iso-
8859-1?q?J=F6rgen_H=E4gglund?= <dataswed@algonet.se> writes
>Hello!
>
>I hope there is someone out there who can help me with this problem.
>I want to show event/progress of initialization in my main form's
>statusbar.
>
>Something like:
>
>procedure TMainForm.FormCreate(Sender: TObject);
>begin
>  // Draw form and it's contents here
>  StatusBar.SimpleText := 'Step 1 of 3: Loading data';
>  LoadData;
>  StatusBar.SimpleText := 'Step 2 of 3: Gathering information';
>  GatherInfo;
>  StatusBar.SimpleText := 'Step 3 of 3: Initializing everything';
>  InitializeMyData;
>end.
>
>Well, I hope You get the idea.
>What's so frustrating is that I can't get my form to show before I start
>executing my initialization code, so the result will be that StatusBar
>shows 'Step 3 of 3:...' and all my code is already run.
>
>Waiting for some answer...
>/JH
>

You need to move this to a different event, try FormActivate or
FormShow.

You may need a flag so that your code is only executed when the form is
first created.
-- 
Alan Black
Technical Details
Message-ID: <fW9HyAAqWDI0Ewbj@opcomp.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34201197.69F44A4A@algonet.se>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd817,df99f0a9e5794c31
X-Google-Attributes: gidfd817,public
X-Google-Thread: 10baee,df99f0a9e5794c31
X-Google-Attributes: gid10baee,public
X-Google-Thread: 108b0b,df99f0a9e5794c31
X-Google-Attributes: gid108b0b,public
X-Google-Thread: 10a7f1,df99f0a9e5794c31
X-Google-Attributes: gid10a7f1,public
X-Google-Thread: f973d,df99f0a9e5794c31
X-Google-Attributes: gidf973d,public
From: Alan Black <alan@opcomp.demon.co.uk>
Subject: Re: Delphi Application Startup Problem!
Date: 1997/09/17
Message-ID: <fW9HyAAqWDI0Ewbj@opcomp.demon.co.uk>
X-Deja-AN: 273338686
References: <34201197.69F44A4A@algonet.se>
Distribution: world
X-NNTP-Posting-Host: opcomp.demon.co.uk [158.152.94.134]
Newsgroups: comp.lang.pascal.delphi.misc,de.comp.lang.pascal.delphi,cern.delphi.general,alt.comp.lang.borland-delphi,alt.lang.delphi