if (PopupMode = pmNone) and HandleAllocated then
if PopupMode = pmNone then
RecreateWnd(Self); // need to refresh handle for pmNone because ParentWindow changes if (fsModal in FFormState) - see GetRealPopupParent
begin
--
RecreateWnd(Self);
HandleNeeded;
end;
if ((PopupMode = pmNone) and HandleAllocated) and not (csDestroying in ComponentState) then