Answer the question
In order to leave comments, you need to log in
It is necessary to act on the main form through the child, how?
In short, there are buttons in the child form. One button, as planned, should open the main form, and the second, in turn, close both the child and the main form. How can it be implemented? I'm trying, it doesn't work.
Answer the question
In order to leave comments, you need to log in
Describe in the child form custom events corresponding to clicking on these buttons.
In the main form, immediately after creating the child form, subscribe to these events and add handlers with the response logic you need. If you need to forward the data from the child form, this is the second question, but you can forward them as parameters of the event handler.
In general, if your child form drives the main one, then something went wrong.
EDIT: It's easier. Use ShowDialog() .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question