What will happen if, as the parent of the window, set the window itself?
  • The error status will be. - karmadro4

1 answer 1

Nothing good will come of it, on Windows hierarchical windows system. Moreover, by standard means you will not do it - in the SetParent function in the VCL there is a check:

 if FParent <> AParent then begin if AParent = Self then raise EInvalidOperation.CreateRes(@SControlParentSetToSelf); ..