karra
asked on
C# Windows App
Hello,
I have a Main form 'Parent' and in that form i have a button 'A'. if i click on the button 'A' in the parent form it takes me to a differnt form 'Child'. (like this)
frmA dr = new frmA();
dr.Show();
In 'Child' i have 2 buttons. One: Submit Second: Clear/Close. I have implemented all the funtionality for the 'Child' form.
After validating the 'Child' form the Submit button gets disabled and Clear button becomes Close button.
Now My question is::
When i click the Close button i want the Button 'A' in the 'Parent' form also to get disabled. I mean, After validating, submitting and closing the child form the Button on the Parent form should also get disabled. How can i do it?
I have a Main form 'Parent' and in that form i have a button 'A'. if i click on the button 'A' in the parent form it takes me to a differnt form 'Child'. (like this)
frmA dr = new frmA();
dr.Show();
In 'Child' i have 2 buttons. One: Submit Second: Clear/Close. I have implemented all the funtionality for the 'Child' form.
After validating the 'Child' form the Submit button gets disabled and Clear button becomes Close button.
Now My question is::
When i click the Close button i want the Button 'A' in the 'Parent' form also to get disabled. I mean, After validating, submitting and closing the child form the Button on the Parent form should also get disabled. How can i do it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can also have the child form raise an event that the parent catches and then have the parent change the button state
ASKER
Can some one show me an example please?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I got along with this problem with a easy answer.
child.ShowDialog(this);
if(!child.IsAccessible)
btnChild.Enabled = false;
child.ShowDialog(this);
if(!child.IsAccessible)
btnChild.Enabled = false;