public static Form FindForm(string key)
{
foreach (Form form in Forms)
{
if (form.Name == key)
{
return form;
}
}
throw new KeyNotFoundException();
}