Vercas
Vercas

Reputation: 9141

Custom text and dropdown button options in OpenFileDialog?

I've recently tried the newest version of WinZip and saw the text and options in the "Zip" file dialog...
How can I do this in C#?
By the way, if you haven't figured it out yet... I am talking about the Vista/7 Open File Dialog.
I would rather have code than a "you take [x] line(s) of code from [this article] to do [this] and figure out the rest yourself". If I could, I would have done that.

Upvotes: 1

Views: 1082

Answers (3)

Vercas
Vercas

Reputation: 9141

I went all Rambo on this and I used the win32 API functions to customize the dialog. Works only when my app runs elevated on Windows Vista or 7.

(Sorry for answering so late, but I forgot about this question...)

Upvotes: 1

logicnp
logicnp

Reputation: 5836

You can use the IFileDialogCustomize interface to achieve the customization, but this can be very cumbersome and time-consuming and inflexible.

Another alternative is to use third party controls like Shell MegaPack which are controls for putting Windows Explorer like file/folder browsing in your own forms.

DISCLAIMER: I work for LogicNP Software, the developers of Shell MegaPack.

Upvotes: 0

Reinderien
Reinderien

Reputation: 15231

To my knowledge, no significant customization can be performed with the default open file dialogue. You'll have to create your own. This isn't too bad, since you can use a file browser control to do most of the complex stuff.


Edit: Apparently "file browser control" came from my imagination and not my memory. I can't find a standard Microsoft-issue file browser control. So your options are:

  • Download a third-party file browser control and integrate that into your dialogue.
  • (more likely) - approach your design problem from a different angle. What exactly does the Winzip dialogue do, and why do you want to replicate it?

Upvotes: 0

Related Questions