if (control is Control) { // Try to use the control's built-in FindForm method to get the parent form Control UIControl = (Control)control; ParentForm = UIControl.FindForm(); // If FindForm didn't work, check if the control is being instantiated, // which means the best bet is to get the last instantiated form if (ParentForm == null && !UIControl.Created) { CheckActiveForm = false; } }Let me know how this works for you!