method one:
MethodInvoker MethInvk = new MethodInvoker(ShowForm5);
BeginInvoke(MethInvk);
private void ShowForm5()
{
Form5 form5 = new Form5();
form5.Show();
}
This delegate method cannot take parameters
Method 2: Delegate method with parameters
ShowFormHandler delShowForm = new ShowFormHandler(ShowForm5);
this.BeginInvoke(delShowForm, new Object[] { stripaddr, type });
public delegate void ShowFormHandler(string stripaddr, int type );
private void ShowForm5(string stripaddr, int type )
{
Form5 form5 = new Form5( stripaddr, type );
form5.Show();
}