E
emr
Hi there, here is the situation:
private void btnStart_Click(object sender, System.EventArgs e)
{
if(btnStart.Text=="START")
{
Thread connect=new Thread(new ThreadStart(Connect2Server));
connect.Start();
}
if(btnStart.Text=="STOP")
{
connect.Suspend(); // An unhandled exception of type
'System.NullReferenceException' occurred in .exe Additional information:
Object reference not set to an instance of an object.
btnStart.Text="RESUME";
.....
thank you
private void btnStart_Click(object sender, System.EventArgs e)
{
if(btnStart.Text=="START")
{
Thread connect=new Thread(new ThreadStart(Connect2Server));
connect.Start();
}
if(btnStart.Text=="STOP")
{
connect.Suspend(); // An unhandled exception of type
'System.NullReferenceException' occurred in .exe Additional information:
Object reference not set to an instance of an object.
btnStart.Text="RESUME";
.....
thank you