> How's this then ... (admittedly doesn't provide the same
> side-effects as the above)
>
> function FindControlForm(WC:TwinControl):Tform;
> begin
>   Result := nil;
>   repeat
>     if WC is TForm then Result := TForm(WC)
>     else WC := WC.Parent;
>   until WC=Result;
> end;

FindControlForm (Nil) -> Access Violation time.  Same thing if WC.Parent is
Nil.

Dennis.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to