I have 2 Forms,FormA and FormB,for FormA have a button,in FormB I have to test if this button in formB is cliked,I tried this code:
FormA://in which I have the button
public bool button6WasClicked = false;
private void button6_Click(object sender, EventArgs e)
{
............
button6WasClicked = true;
}
FormB://in which I have to test if the button in FormA is cliked
FormA nv;
private void button3_Click(object sender, EventArgs e)
{
if (nv.button6WasClicked) //the error is at this line
{
..........
button6WasClicked = false;
}
}
I have this problem :
the Translation is:Object reference not set to an instance of an object
thanks for Help :)