We set this property in the actual Get of the ParentForm property itself. I really don't understand what you are trying to accomplish here so I am not sure how to respond to this post. Are you just wanting to know how we implement the ParentForm property so that you can emulate this on a control of your own? If so, then just open up the source code and you can see what we are doing. If you are trying to use OUR ParentForm property and just wanting to set it in code, you will not really be able to do this since the logic is within the ParentForm property itself. This is a readonly property that is self aware and if it has not been set it attempts to look at the ParentContainer for a class of the BaseForm type until it finds one (or doesn't find one).
You may be better off using the ParentContainer property since it can be set in code and it will accept any object that implements the IContainerControl interface.