Hello all,
I have seen a couple threads on this site in ref to enabling and disabling buttons on different forms, however, I still can't get it right.
I have went into the designer.cs and changed the button from private to public modifyer and placed
mainpage.adminpanelbtn.enabled == true;
but without doubt it didn't work.
In my app I have a form that opens and disables 4 buttons on the main page. When the user clicks the close button on the form the 4 buttons then become enabled.
I know how to disable the forms by
private void safetipsbtn_Click(object sender, EventArgs e)
{
mainpage mp = new mainpage();
this.AddOwnedForm(mp);
safetips safe = new safetips();
safe.Show();
internetsitebtn.Enabled = false;
howtousebtn.Enabled = false;
adminpanelbtn.Enabled = false;
}
Everytime I try to enalbe them from the new form it throws errors
An object reference is required for the non-static field, method, or property 'Promo_SSP.mainpage.adminpanelbtn'
When I mess around with it and try to fix it on my own I get more errors (which means I don't know what I am doing...lol)
Can anyone help me?
I am new to C# and i am trying to convert from vb.net (which is a lot easier and I know how to fix the problem)
thanks in advanced
P.S. this is a windows form and I am using visual studio 2008 pro
daveofgv