Sunteți pe pagina 1din 2

Videos de Visual http://mrfranklingrtutoriales.blogspot.com.co/p/programacion.

html

Form1.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsForInventario
{
public partial class FrmPrincipal : Form
{
public FrmPrincipal()
{
InitializeComponent();
}

private bool MostrarHijo(String NombreFormulario)


{
foreach (Form ElFormulario in this.MdiChildren)
{
if (ElFormulario.Name == NombreFormulario)
{
ElFormulario.Focus();
ElFormulario.Show();
return true;
}

}
return false;

private void gestionarRecursosToolStripMenuItem_Click(object sender,


EventArgs e)
{
if (MostrarHijo("FrmfrmGestionar_Computador") == true) return;

Gestionar_Computador frmGestionar_Computador = new


Gestionar_Computador();
frmGestionar_Computador.Name = "FrmGestionar_Computador";
frmGestionar_Computador.MdiParent = this;
frmGestionar_Computador.Show();

}
}
}

S-ar putea să vă placă și