Controls declared in the property bag have a different lifecycle than symbols declared in logic or COM APIs. They are a bit stubborn to get rid of.
A further problem is that the vsElastic is a container control. You need to retain the contained controls when you remove the elastic. You can try using two preedits to remove it from the source: You have to remove the top of the control declaration/initializations and also remove the End; leaving the contained controls in place. I do not think the unusual indentation of the remaining content will be an issue.
<Replace name="remove the Begin vsElastic and its properties up its first child control. Note that '…' is a multiline wildcard" > <OldBlock><![CDATA[ Begin vsOcx6LibCtl.vsElastic Base ... Begin VB.CommandButton cmdExit ]]></OldBlock> <NewBlock><![CDATA[ Begin VB.CommandButton cmdExit ]]></NewBlock> </Replace> <Replace name="Remove the End of the vsElastic"> <OldBlock><![CDATA[ End End Begin VB.Label Label9 ]]></OldBlock> <NewBlock><![CDATA[ End Begin VB.Label Label9 ]]></NewBlock> </Replace>
Note this removing a control may result undefined symbol results (e.g. late calls) if the remove control is referenced in logic.
These could also be implemented using gmSL scripting to edit the code before processing.
https://portal.greatmigrations.com/display/GMG/Support+Statement%3A+gmSL+EditSource
See also this article that talks about removing a control that is used in logic.
https://portal.greatmigrations.com/display/GMG/Support+Statement%3A+Upgrading+a+COM+Component+property+to+a+WinForms+Static+property