Advertisement
Fhernd

FormularioHijo.cs

Feb 26th, 2018
1,572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. using System;
  2. using System.Windows.Forms;
  3.  
  4. namespace R705FormulariosMdiHijos
  5. {
  6.     public partial class FormularioHijo : Form
  7.     {
  8.         public FormularioHijo()
  9.         {
  10.             InitializeComponent();
  11.         }
  12.  
  13.         private void btnMostrarInformacionFormulariosHijos_Click(object sender, EventArgs e)
  14.         {
  15.             foreach (Form formulario in this.MdiParent.MdiChildren)
  16.             {
  17.                 FormularioHijo formularioHijo = (FormularioHijo) formulario;
  18.  
  19.                 MessageBox.Show(formularioHijo.lblFechaHora.Text, formulario.Text);
  20.             }
  21.         }
  22.  
  23.         private void FormularioHijo_Load(object sender, EventArgs e)
  24.         {
  25.             lblFechaHora.Text = DateTime.Now.ToString();
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement