How to find the form in which the Winforms control is located in the control?

I want to have access to the fact that Form supports my control in the code of my control, so that:

myControl.ParentForm

Is it possible? If so, how?

+3
source share
1 answer

You can use FindFormthe control method:

Form parent = myControl.FindForm();
+8
source

Source: https://habr.com/ru/post/1724432/


All Articles