hello i have this code here (Owner as ReadBarCodeInMenu).btnContainerInquiry.Enabled = true;
it keeps me throwing an instance whenever i tried to access a button of another page it tried this code in a test 2 forms and it works perfectly fine but when i put it in system i gave me an error.Please help me
edit:
form ReadBarCodeInMenu
private void btnContainerInquiry_Click(object sender, EventArgs e)
{
inquiry.Owner = this;
btnContainerInquiry.Enabled = false;
}
form ContainerInquiry
private void logoutBtn_Click(object sender, EventArgs e)
{
(Owner as ReadBarCodeInMenu).btnContainerInquiry.Enabled = true;
error// {"Object reference not set to an instance of an object."}
close.
}
this is how i access the bottom of an another form if i do this in new 2 form it works with no error.