simple question, I guess.. BUt having hard time with it. I want some buttons in my form to be disabled if ToolStripMenuItem.checked is true. Meaning, I have 2 items in my toolstrip menu, If one of them is checked, the button is disabled. If the second is checked, the button is enabled. The button should be disabled from the moment the program is shown, so I cannot put it inside the click button handler. I tried this one:
public Form1()
{
if (operationalToolStripMenuItem.Checked == true)
Burn_JED_UES.Enabled = false;
}
But I'm getting an error, saying:
Object reference not set to an instance of an object,
referring to
operationalToolStripMenuItem.Checked == true
Any advice? Thx.