how do I make one of my form's Checkbox set to enabled from a different form?
I have tried several things, which seem none worked.
if (i == 0)
{
MessageBox.Show("Login Failed.");
}
else
{
MessageBox.Show("Login Successful.");
Hide();
Hacks mainForm = this.Parent as Hacks;
if (mainForm != null)
{
checkBox1.Visible = true;
mainForm.Show();
}
This is the code I Currently have, after a successful login from the server, a message box is displayed saying: Login Successful. What I want it to do is after successful login, to enable the checkbox on the mainform. Since mainform is there, and I do have a checkbox, why can't it enable the checkbox; as it appears to not do so. What am I doing wrong?