Take the 2-minute tour ×

After a lot of thought and consideration, and Google-ing, I'm hell-bent on creating my own SaveFileDialog.

But I do not know where to start and since I haven't seen anything around the web, I would like to know if anybody has done this before, and what I should look into, or how I might go about doing this? Any help would be greatly appreciated.

Thank you :-)



I am wanting to build a new SaveFileDialog because I feel the need (or want) to add more functionality to it. And I also feel that if I build a new one, I'll learn alot more about C# and how the SaveFileDialog works behind the scenes

To be quite honest, I don't like the current SaveFileDialog (Yes, it does the job) but I really do want to add extra functionality to it.

Ah, I don't think that there are any restrictions. I can't say for sure because I'm new to this and don't know what is required or...

share|improve this question
Why are you developing your own SaveFileDialog when we have inbuilt control? –  Shoban Sep 7 '09 at 8:37
What are your requirements/restrictions? What is the reason not to use the built in one? –  Frank Bollack Sep 7 '09 at 8:38
What do you exactly want? And why is the windows SaveFileDialog not sufficient? Because I can tell you you will need a way to browse your harddrive(s) but I think you already thought of that... –  Zenuka Sep 7 '09 at 8:38
Thanks for the comments, I edited my question :-) –  baeltazor Sep 7 '09 at 8:47
add comment

4 Answers

up vote 1 down vote accepted

The SaveFileDialog is part of the operating system and will actually look different on different versions of the OS. There are a lot of ways to customize it, but that is not so easy in a Windows Forms project. It can still be done, but you have to hook into the native Win32 API. If you simply want to play around with Windows Forms and C# you can go ahead and design a form that looks like a SaveFileDialog but you will miss all the goodness of the native dialog.

You can read more about the common open and save as dialog boxes on MSDN, but if you are used to Windows Forms programming you may feel alienated by the native Win32 API. Window Vista has introduced a new common item dialog and the COM based API makes it easier to use in a Windows Forms application.

share|improve this answer
add comment

Why not extend it instead of creating from scratch?

share|improve this answer
add comment

Well a dialog is just a form. Start with a form, add the file system browsing components (listview, drop downs) etc, add your code behind. Its not that difficult but may be tedious, but I'd say a good educational exercise where the you'll learn why you may want to just use the built in one.

share|improve this answer
add comment

If you are really really sure you want to create your own version of a SaveFileDialog, I'd recommend not just cloning the existing one. If you make it look like the standard one, people will expect it to behave like the standard one, but there's lots of little details and you probably won't get them all.

You want to avoid The Uncanny Valley of User Interface, so you should make it clear that it isn't trying to be the SaveFileDialog + some-new-bits. It should just achieve the same goal (i.e. choosing where to save something).

If you do want to create SaveFileDialog + some-new-bits, then going down the path of extending the dialog as Shoban says is the way to go.

NOTE: None of this really applies if all you want to do is build your own for learning purposes, and then throw it away when you're doing. But if you ever want to use it a real project, then you should keep this in mind.

share|improve this answer
+1 for: If you make it look like the standard one, people will expect it to behave like the standard one –  Nifle Sep 7 '09 at 11:49
add comment

Your Answer


