HRS.Present.FamilyMemberForm ff;
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
ff = new HRS.Present.FamilyMemberForm();
this.addcontrol(ff);
}
private delegate void addcontrolmethod(Control ctl);
private void addcontrol(Control ctl)
{
if (this.tabPage1.InvokeRequired)
{
this.tabPage1.BeginInvoke(new addcontrolmethod(this.addcontrol), new object[] { ctl });
}
else
{
this.tabPage1.Controls.Add(ctl);
}
}