runtime error: onShow, onPaint, onActivate, onEnter order error on the form's first appear
Original Reporter info from Mantis: pitwalker
-
Reporter name: pitwalker
Original Reporter info from Mantis: pitwalker
- Reporter name: pitwalker
Description:
I cannot create graphical application with visual actions after
form's first appear.
Any action runs in the background.
with my code:
In Tubo Delphi Explorer the order is:
Create, Show, PAINT, ACTIVATE, ENTER
In Lazarus 0.9.24 the order is:
Create, Show, Enter, Activate, PAINT
Additional information:
procedure TForm1.FormCreate(Sender: TObject);
begin
application.MessageBox('onCreate','event',0); //1st, don't show in the taskbar
firstshow:=true;
firstpaint:=true;
firstactivate:=true;
firstenter:=true;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
If firstshow then begin
firstshow:=false;
application.MessageBox('onShow','event',0); //2nd, don't show in the taskbar
end;
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
If firstPaint then begin
//form appears
FirstPaint:=False;
application.MessageBox('onPaint','event',0); //5th, form appear (but not correct at first)
end;
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
If firstactivate then begin
Firstactivate:=False;
application.MessageBox('onActivate','event',0); //4th, form not visible!
end;
end;
procedure TForm1.Button1Enter(Sender: TObject);
begin
IF firstenter then begin
firstenter:=false;
application.MessageBox('onEnter','event',0); //3rd, appear in the taskbar
end;
end;
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
application.MessageBox('onClose','event',0); //6th
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
application.MessageBox('onDestroy','event',0); //message don't appear
end;
Mantis conversion info:
- Mantis ID: 10654
- Version: 0.9.24
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 25274 (#a12d403a)
- Target version: 1.0.0
- LazTarget: 1.0