0% found this document useful (0 votes)
25 views2 pages

Videos de Visual: Using Using Using Using Using Using Using Using Namespace Public Partial Class Public

The document is code for a Windows form application written in C# that manages inventory. It includes namespaces for the form and framework, a main form class with a method to show a child form if it already exists or create and show a new instance if not. There is a click event handler for a menu that calls this method to launch the computer management form, setting its name and parent form.

Uploaded by

Nidia Castro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Videos de Visual: Using Using Using Using Using Using Using Using Namespace Public Partial Class Public

The document is code for a Windows form application written in C# that manages inventory. It includes namespaces for the form and framework, a main form class with a method to show a child form if it already exists or create and show a new instance if not. There is a click event handler for a menu that calls this method to launch the computer management form, setting its name and parent form.

Uploaded by

Nidia Castro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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();

}
}
}

You might also like