Thanks, Jeremy. I'm using Delphi 2006. I experimented with different default
monitor settings, and always got the same error. All that changed was the
line in which the error happened; the line corresponded to whatever I had
set for the default monitor property. I will continue to experiment, using
your stable code as a starting point.

Thanks again -- Al

p.s. D2006 doesn't have an Application.MainFormOnTaskBar property.


On Thu, Aug 13, 2009 at 5:52 PM, Jeremy North <jeremy.no...@gmail.com>
wrote:

You didn't state your delphi version or which default monitor settings
are applied to the forms.

A project source as below works as expected for me on a multi-monitor
system.

This is in Delphi 2009.

program SplashTest;

uses
 Forms,
 SysUtils,
 MainForm in 'MainForm.pas' {Form29},
 DataModule in 'DataModule.pas' {data: TDataModule},
 SplashForm in 'SplashForm.pas' {frmSplash};

{$R *.res}

begin
 Application.Initialize;
 Application.MainFormOnTaskbar := True;
 Application.CreateForm(Tdata, data);
 frmSplash := TfrmSplash.Create(nil);
 try
   frmSplash.Show;
   frmSplash.Update;
   Application.CreateForm(TForm29, Form29);
 finally
   FreeAndNil(frmSplash);
 end;
 Application.Run;
end.

I just run a simple loop in the FormCreate to delay the launching and
allow the marquee progress bar to update on the splash. If you want
the test project I can can it to you directly.

procedure TForm29.FormCreate(Sender: TObject);
var
 LCnt: Int64;
 I: Integer;
begin
 LCnt := 0;
 for I := 1 to 99999999 do
 begin
   Inc(LCnt, I);
   Application.ProcessMessages;
 end;
 Caption := IntToStr(LCnt);
end;
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to