Hey I'm new to programming and to the forum. I am creating a simple inventory system that uses both modal and non-modal forms. My challenge is I created a change password form (modal) and it has a 'change password' button as well as a 'cancel' button. When i click cancel, it closes everything. I dont want that I only want the change password form to close leaving the parent form in view. I have search high and low but the help that I got (this.close, dispose) does not work. I even changed the dialogResult property to cancel but that didnt work either. How do I accomplish this?
JesGo 0 Newbie Poster
Recommended Answers
Jump to PostI'm thinking that perhaps you're coding and the set up of your properties might be out. With accept and cancel assigned on the modal form and
this.Close();
in the click event of the cancel button, just the modal form closes, not the parent. when testing this I also set the …
Jump to PostThis is a code snippet I posted some time ago. I hope it can help.
All 8 Replies
Momerath 1,327 Nearly a Senior Poster Featured Poster
JesGo 0 Newbie Poster
Momerath 1,327 Nearly a Senior Poster Featured Poster
tinstaafl 1,176 Posting Maven
samsylvestertty 12 Newbie Poster
JesGo 0 Newbie Poster
samsylvestertty 12 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.