C# New File Dialog

I want to create a new file dialog box in C#, I'v tried this but it doesn't work:

               OpenFileDialog MyOpen=new OpenFileDialog();

Please include code sample.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TomlinsonMiddle School Assistant TeacherCommented:
It works fine for me:

        private void button1_Click(object sender, EventArgs e)
            OpenFileDialog MyOpen = new OpenFileDialog();
            MyOpen.CheckPathExists = false;
            MyOpen.CheckFileExists = false;
            if (MyOpen.ShowDialog() == DialogResult.OK)
                String fileName = MyOpen.FileName;
                MessageBox.Show(fileName, "You selected:", MessageBoxButtons.OK, MessageBoxIcon.Information);
                MessageBox.Show("No Selection", "Dialog Cancelled", MessageBoxButtons.OK, MessageBoxIcon.Information);

Could you define "but it doesn't work" in a little more detail?
tsmolskowAuthor Commented:
I want it to behave like the New File dialog in VS 2005 which presents you a set of file types/templates to choose from.
I think that is a control they designed themselves. Its not standard. The control is easy to design though...
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Mike TomlinsonMiddle School Assistant TeacherCommented:
You could Use a ListView control which allows you to assign Icons to the Items in it.
tsmolskowAuthor Commented:
OK, so if the dialog is not standard then what's the best control to make it with?  Idle Mind you mentioned list view, but is the control to the left just s tree view, and what is the control on the bottom?
Mike TomlinsonMiddle School Assistant TeacherCommented:
I'm not seeing any "New XXX" dialogs that have TreeViews in them (I'm using C# 2005 Express).   The closest is a ListView with the View() property set to "Large Icon".  The MS dialog has different "sections" in their window but I have no idea how to do that with the standard controls.

Can you find an Image on Google Images that you can post a link to?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tsmolskowAuthor Commented:
I'll look, but even if it matched the add new item dialog that would be cool, and that should be the same in express as it is in VS 2005
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.