I am creating a windows application. I have two buttons. I wrote the following code snippet.
frmRb obj = new frmrb();
private void btnPd_Click(object sender, EventArgs e)
{
btnCancel.Enabled = true;
obj.btnRtn.Enabled = true;
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
obj.BringToFront();
obj.Focus();
}
The above coding does not cause errors.
All instructions work correctly, but the following statement does not work correctly:
obj.btnRtn.Enabled = true;
not executed.
The frmrb forms are brought to the fore and focused, but btnRtn is not included, this statement is obj.btnRtn.Enabled = true; does not work.
By default, I set the btnRtn Enabled property to false. And note that the Modifier property of the btnRtn button is set to PUBLIC.
Now how do I change the encoding so that I can follow this instruction.
obj.btnRtn.Enabled = true;
Can anybody help me?
Thanks in advance!