tags:

views:

37

answers:

1

I want to be able to access whatever Form hosts my control within the code of my Control, so like:

myControl.ParentForm

Is this possible? If so, how?

+8  A: 

You can use the FindForm method of the control:

Form parent = myControl.FindForm();
Fredrik Mörk