
28/02/2008, 17:22
|
 | Colaborador | | Fecha de Ingreso: septiembre-2007 Ubicación: San Francisco, United States
Mensajes: 3.858
Antigüedad: 17 años, 5 meses Puntos: 87 | |
Re: abrir formulario una sola vez Puedes crear un metodo como el siguiente en el q envias el tipo de forma child a mostrar y validara si existe activandolo y si no creandolo
public void ShowForm(Type FormType)
{
Form TargetForm = null;
foreach(Form child in this.MdiChildren)
if(child.GetType().Equals(FormType))
TargetForm = child;
if(TargetForm == null)
TargetForm = (Form)Activator.CreateInstance(FormType);
TargetForm.Show();
}
Saludos
Peter |