Control.Close method

From Xojo Documentation

Method

Control.Close()

Supported for all project types and targets.

Closes a control.

Notes

Closing a control permanently removes the control from memory, making it impossible to access. You can close both non-indexed controls and indexed controls. When you close an indexed control, the indexes for the remaining controls will shift downward so that the indexes start with zero and are consecutive.

Sample Code

The following code closes the control. When this is executed from a visible control, the control disappears from the window.

Me.Close