private static void OtherThread(object args) { IntPtr mainWindowHandle = (IntPtr)args; var subForm = new ThreadForm(); subForm.Visible = true; subForm.Location = Point.Empty; subForm.Size = new Size(100, 20); SetParent(subForm.Handle, mainWindowHandle); Application.Run(subForm); }
private void btnThread_Click(object sender, EventArgs e) { ThreadForm form1 = new ThreadForm(); form1.ShowDialog(this); }
private void threadsToolStripMenuItem_Click(object sender, EventArgs e) { ThreadForm thread = new ThreadForm(); thread.ShowDialog(); }