I made a form for creating a new solution and a new version. There is a close button. I can't find a way how to do it. I need when the cancel button is clicked the operation to be stopped and the form to close
Loading
I made a form for creating a new solution and a new version. There is a close button. I can't find a way how to do it. I need when the cancel button is clicked the operation to be stopped and the form to close
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rositsa RusevaPosted Dec 17, 2021, 10:59 AM
Sachin SinghPosted Dec 17, 2021, 10:46 AM
Rositsa RusevaPosted Dec 17, 2021, 10:20 AM
This is what I've been trying to do:
https://pastebin.com/WdXpBAVe
Rositsa RusevaPosted Dec 17, 2021, 9:41 AM
Yazhini MPPosted Dec 16, 2021, 4:53 AM
The app will close when the main form is closed. You can try the following in your form's Cancel button event handler:
this.Close();
You can also set this. DialogResult property to false. The form will close as a result of this.
In any case, make sure your code is processing according to which button was used to close the form if you're also handling the Close event.
vivek kulkarniPosted Dec 15, 2021, 4:39 PM