Is it possible to set the OpenFileDialog's cancel button enable = false? If so, How?
I'm using winforms
Edit
OpenFileDialog file_open_dialog = new OpenFileDialog();
Is it possible to set the OpenFileDialog's cancel button enable = false? If so, How?
I'm using winforms
Edit
OpenFileDialog file_open_dialog = new OpenFileDialog();
I don't believe so, and with good reason! Are you sure that you want to disable the Cancel button? Being that this is a modal dialog this would prevent the user from continuing (and hence making your application unusable) until they selected a file - there are almost certainly going to be scenarios where this simply isn't possible, or the user doesn't want to be forced into saving a file.
Of course I could be wrong and there could be a completely legit scenario that I'm not aware of - however I'm afraid that Microsoft were also unaware of this scenario and so the OpenFileDialog doesn't support disabling the cancel button.
I'm afraid that if you really don't want a cancel button you will need to create your own clone of the dialog.
You probably want to check out these articles:
http://www.codeproject.com/KB/dialog/CustomizeFileDialog.aspx