Hi hopefully I'm in the right place, if not please advise
Delphi 4
Paradox tables
My application has a splash screen (Welcome) that is displayed during
startup that then displays a login screen (LoginScreen) and when login has
been performed successfully kicks in the 'Mainscreen' of the app.
the following code is a snippet from 'Delphi/Project/View Source'
-----------------------------------------------------
begin
Application.Initialize;
with TWelcome.Create(nil) do
try
ProgressBar1.Max :=110;
Show;
Update;
Application.Title := 'Application Name';
ProgressBar1.StepBy(10);
Application.CreateForm(TMainForm, MainForm);
ProgressBar1.StepBy(10);
Application.CreateForm(TAnnually, Annually);
ProgressBar1.StepBy(10);
Application.CreateForm(TContactDB, ContactDB);
ProgressBar1.StepBy(10);
Application.CreateForm(TUpdateDiary, UpdateDiary);
ProgressBar1.StepBy(10);
Application.CreateForm(TGetProperty, GetProperty);
ProgressBar1.StepBy(10);
Application.CreateForm(TFourWeekly, FourWeekly);
ProgressBar1.StepBy(10);
Application.CreateForm(TCalMonth, CalMonth);
ProgressBar1.StepBy(10);
Application.CreateForm(TQuarterly, Quarterly);
ProgressBar1.StepBy(10);
Application.CreateForm(TSchedule, Schedule);
ProgressBar1.StepBy(10);
Application.CreateForm(TWeekly, Weekly);
ProgressBar1.StepBy(10);
Application.CreateForm(TSixMonthly, SixMonthly);
finally;
Free;
end;
Application.CreateForm (TLoginScreen,LoginScreen);
LoginScreen.ShowModal;
LoginScreen.Free;
Application.Run;
-------------------------------------------------
This has worked fine for several years. When the app starts I perform
datatable update routines and other system file updates in the 'OnCreate'
method of the 'Welcome' screen. This means that sometimes there is a long
lag in time from when a user starts the app to when the welcome screen
appears. This has the effect they keep starting multiple versions of the app
which causes other problems. So.....what I thought I'd do was to call a
screen called 'Wait' as the first line of the 'Welcome/OnCreate' screen that
displays whilst the update code is performed so the user knows the app is
loading...this works fine until log in time, once log in details have been
validated the application neatly closes inself down instead of displaying
the 'Mainscreen' of my app? If I take out the code that displays the 'wait'
screen from the 'Welcome' screen 'OnCreate' all is well again?
Any suggestions greatly appreciated, thanks for your time.
--
Kind Regards
Glenn Greatwood
Key-Data Systems
www.key-data.co.uk