Evbpc.Framework.Windows.Forms.Form.FindForm C# (CSharp) Method

FindForm() public static method

Retrieves the Form with the specified Control.Name.
https://msdn.microsoft.com/en-us/library/system.windows.forms.control.findform(v=vs.110).aspx
public static FindForm ( string key ) : Form
key string
return Form
        public static Form FindForm(string key)
        {
            foreach (Form form in Forms)
            {
                if (form.Name == key)
                {
                    return form;
                }
            }

            throw new KeyNotFoundException();
        }