Use the DELETEOBJECT command to delete form objects on demand.
Options
ComponentID
The unique identifier that is assigned to the component, or control .
ParentControl
The form object in which other controls are contained within. A parent control can be an actual form or any of the following form controls: Panel, EnhancedPanel, GroupBox, EnhancedGroupBox, Tab Control, Enhanced Tab Control, Status Bar, RadioGroup, DB RadioGroup, Variable RadioGroup, Scrolling Region, etc.
This command can be directly associated to the CREATEOBJECT command.