Answer the question
In order to leave comments, you need to log in
C#. How to save information between Windows Forms?
Good afternoon.
I have a main menu which has an "advanced" button. When this button is pressed, another window appears, and the Enabled parameter of the main window becomes false.
Question: how to set the Enabled main window to true when clicking on "Cancel" and close the additional one ?
Answer the question
In order to leave comments, you need to log in
There are a lot of options:
1. Pass a link to an instance of the class of the main window of the form, through the constructor when creating another window.
2. Pass a delegate to the function, also through the constructor
3. Create an event in the dependent window class and subscribe to it after creation.
etc.
https://docs.microsoft.com/en-us/dotnet/api/system...
Open a new form through a dialog. After closing, you will have the result.
In addition, use the Global object with states, and in forms, only change its properties.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question