|
private void btnCreate_Click(object sender, EventArgs e)
{
for (int i = 1; i < 3; i++)
{
_i = i;
MethodInvoker mi = new MethodInvoker(this.InvokeFun);
BeginInvoke(mi);
}
}
private void InvokeFun()
{
MdiChild formMdiChild = new MdiChild();
formMdiChild.LineNo = _i;
formMdiChild.Text = _i.ToString();
formMdiChild.MdiParent = this;
Thread t = new Thread(new ThreadStart(formMdiChild.Show));
t.Start();
} |
|