[Lazarus] TApplication.UpdateMainForm

Fabio Luis Girardi fluisgirardi at gmail.com
Wed Feb 17 21:25:47 CET 2016


Hi all!!

I'm creating a new form class with some extra features, derived from
TCustomForm. But when I override the procedure CreateWnd to register the
new instance of my form class as the main form of the application, I
receive a warning talking that my form class (TSecureForm) and TForm are
not related. The CreateWnd code is:


procedure TSecureForm.CreateWnd;
begin
  if (Application<>nil) then
    Application.UpdateMainForm(TForm(Self));
  inherited CreateWnd;
end;

So, I take a look into TApplication.UpdateMainForm and I see:

procedure TApplication.UpdateMainForm(AForm: TForm);


My question is: The parameter AForm should be of type TCustomForm instead
of TForm?

-- 
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160217/6da59171/attachment-0002.html>


More information about the Lazarus mailing list