Search code examples
winformscontrolsfindcontrol

find usercontrol that a control resides in


I know that if I have a control, I can do controlobj.FindForm to get a handle on the form it resides in. but is there a similar method to find out the UserControl that a control is in?

thanks

nat


Solution

  • ended up recursing my way up the parent tree until I hit a usercontrol