N
N
Nikita Verdinsky2020-09-29 21:29:16
C++ / C#
Nikita Verdinsky, 2020-09-29 21:29:16

How to close User Control?

Good evening. I have a form, there is a panel on it, when the form is loaded, a user control is placed in the panel, when you click on the button located in this user control, a new user control appears, and now the question is: how else can I close the first user control before opening the second one? windows form application.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-09-29
@firedragon

The panel has child controls, and you subscribe to the button event or create your own.
When it works, go through the collection and remove the control that was the sender.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question