Keep modal window open when folderbrowser closes
I have a main Windows form which launches a modal dialog to get some configuration values which are paths.
From the modal window I launch a folderBrowser (wanting to do it for each path to be configured).
When the folderBrowser closes the modal window that launched it closes too.
This means that the user has to open the folderBrowser for each configuration setting rather than just once.
Why is the mod开发者_开发问答al configuration window closing and how can I keep it open until the user has set all the parameter values?
Thanks
Ok, I answered my own question. The trick is to intercept the closing event and test a flag which I set on the condition that all folder values are valid. If they aren't set e.Cancel = true;
精彩评论