Exemplo n.º 1
0
		private void cmdNew(object sender, EventArgs e)
		{
			// Show a new child form.
			Child frmChild = new Child();
			frmChild.MdiParent = this;

			frmChild.RefreshText(synchronizedText);
			mdiIndex++;
			frmChild.Text = "MDI Child #" + mdiIndex.ToString();

			frmChild.Show();
		}
Exemplo n.º 2
0
		public void RefreshChildren(Child sender, string text)
		{
			// Store text for use when creating a child form, or if needed later.
			synchronizedText = text;

			// Update children.
			foreach (Child frm in this.MdiChildren)
			{
				if (frm != sender)
				{
					frm.RefreshText(text);
				}
			}
		}