I am using a SaveFileDialog and would like to evaluate whether a file meets certain conditions before allowing it to be saved. If it doesn’t meet the criteria, I don’t want the SaveFileDialog to close when “Save” is clicked. I thought the FileOK might work, but the dialog looks like it is already closed by the time that event is fired, and I don’t see a way to prevent it from closing in any case.
Share
FileOKis aCancelEventHandler– you just have to set theCancelproperty of theCancelEventArgstotrue.