Block context menu in OpenFileDialog

Is it possible to programmatically block users from accessing the context menu in the files listed after displaying the openfiledialog control that comes with the .net framework?

The goal is to block their access to "open" or "open with" and only allow them to select a file from the list.

My only idea is to create my own control instead of using System.Windows.Forms.OpenFileDialog

+1


a source to share


2 answers


Your fastest and surest bet in this situation would be to deploy your own OpenFileDialog.

Alternatives would be to try and grab the right click in the open file dialog and not allow it to be processed



As a side note, I would be annoyed by the OpenFileDialog which doesn't behave like any other open file dialog in there (ie, one that prevents me from doing tasks like renaming or "open with")

+2


a source


I would go over the properties of the controls carefully, it is usually an option for this kind of thing.



0


a source







All Articles