Luis Costa Luis Costa - 12 hours ago 2
C# Question

Removing objects in Visual Studio

I'm working on a Windows Form Application and I want to remove some objects when I use the Menu Strip.

enter image description here

enter image description here

I want to remove the objects from the form when I press "Descarregar cashmatic".
Is it possible?

Answer

The first thing is that you have to create the on_Click event. Only adding the control property controlName.visible and set it on false, it will automatically hidden from the list.

private void controlName_Click(object sender, EventArgs e)
{
    controlName.visible = false;
}

I hope this help you.