Hi, this is simple.
private void button1_Click(object sender, EventArgs e)
{
Class1 sample = new Class1();
sample.send();
}
In this above block of code, you are creating
sample object using
Class1's default constructor
new Class1();
, which won't initialize
mMainForm object. Instead this, use object
a, because it has
mMainForm object initialized.