Saturday, 15 September 2012

c# - How to find the Form that hosts a particular a Winforms Control within the Control? -


I want to be able to access whatever I control in my control code, such as:

  myControl.ParentForm  

Is this possible? If so, then how?

You can use the control method:

  form Parent = myControl.FindForm ();  

No comments:

Post a Comment