I am writing a Windows form C# project and stuck on a simple issue where I am trying to change properties on a MDIParent from a child form and despite that there are no errors the property does not change. So here's the breakdown.
toolsToolStripMenuItem (Modifier - Public) (Currently set to enabled = false on load)
[On Child form]
Password box with the following code in the OK button.
if (txtPassword.Text == "password")
MDIParent1 parent = new MDIParent1();
parent.toolsToolStripMenuItem.Enabled = true;
MessageBox.Show("This computer has now been authorized for one session use.", "Access Granted", MessageBoxButtons.OK, MessageBoxIcon.Information);
MessageBox.Show("You are not authorized to use this program", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Stop);
I did add a break to see if it hits that code and it does but the MDIParent object remains disabled. During my step into of the break it never goes back to anywhere that re-disables the menu item. Any ideas?