Hello Alan,

> as long as I only need to access TForm
> properties. The problem--obvious to all of you--is that any GUI form
> we use inherits from TForm and has additional properties, (component)
> fields, etc. None of these would be available when I pass a reference
> to TForm.

You can do this with a proper type cast. Just tell the compiler that
this particular object is something else:

type
  TMyForm = class(TForm)
  public
    Test: integer;
  end;

procedure Foo(F: TForm)
begin
  TMyForm(F).Test := 0;
end;

---
Rgds, Wilfried
http://www.mestdagh.biz

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to