How can I close one form
-
In my application I have one main window adn the second appears when I want to type in some data, then I click on the my bytton and I want to close that form. How can I do it?. I have tried the Application.Exit(); command but it close all windows. Mariuszfryta
-
In my application I have one main window adn the second appears when I want to type in some data, then I click on the my bytton and I want to close that form. How can I do it?. I have tried the Application.Exit(); command but it close all windows. Mariuszfryta
-
In my application I have one main window adn the second appears when I want to type in some data, then I click on the my bytton and I want to close that form. How can I do it?. I have tried the Application.Exit(); command but it close all windows. Mariuszfryta
Instead of Application.Exit call the Close method of your Form inside the click event handler of your button. Another way would be setting the DialogResult property of your button to something else than None. This way you don't even need the click event handler.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
-
Thanks.