save the settings to my form project

BIG BEN

Member
Joined
Jul 6, 2013
Messages
9
Programming Experience
1-3
Hello. I need help. I want to save the settings when I add a new tab page. When I the application run and then press the add button I add a new tab. But when I the aplicattion close, the new tab page disappears. How can I that save to my form project?
 
I understood you perfectly. The code I provided displays the dialogue to get the tab text first, because that is the better way to do it. Apart from that improvement, it does exactly what you want to do. It is therefore you who did not understand me. It doesn;t get too much simpler I'm afraid.
 
Are you setting the DialogResult of the dialogue form to OK? If not then ShowDialog will not return OK so the contents of the If block will not be executed. The idea is that the user can cancel the operation if they decide not to add the tab. If you set the form's DialogResult to Cancel or just call Close, or the user clicks the Close button on the title bar, then ShowDialog returns Cancel. If you want ShowDialog to return OK then you have to make it do so by setting the form's DialogResult property.
 
Back
Top