Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3785856
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:35:34+00:00 2026-05-19T11:35:34+00:00

I have a VB/C# .NET 2.0 project that, if possible, I would like to

  • 0

I have a VB/C# .NET 2.0 project that, if possible, I would like to customize the OpenFileDialog box to select a directory rather than a file. The reason for this is because the FolderBrowserDialog is ugly and a pain for most of my users to navigate using.

I know how to filter extensions using OpenFileDialog, but is there a flag or variable I can set that will allow me to only show directories and select those directories that is built into .NET? And if not, what is a good third party dialog to use/where should I begin if I am to create my own?

I apologize, I do not have much experience creating frontends. Any help or direction on this would be greatly appreciated 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:35:35+00:00Added an answer on May 19, 2026 at 11:35 am

    After checking the question that Mayank posted, I found out that there is no native way to do this in .NET. However, one of the posts by Scott Wisniewski yielded the exactly what I was looking for.

    The only thing I had to do to make this work in .NET 2.0 was add the following code to my project in a file called ExtensionAttribute.cs. This method is not needed in .NET 3.5+, but please note that this is reported to not work at all with Visual Studio 2005.

    namespace System.Runtime.CompilerServices
    {
       [AttributeUsage(AttributeTargets.Method)]
       public sealed class ExtensionAttribute : Attribute
       {
          public ExtensionAttribute() { }
       }
    }
    

    Again, this code snippet only works with Visual Studio 2008, it will not work with VS 2005.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a VB5 (non .net) project that I would like to upgrade to
I have an MVC project that I would like to write in .NET 4.0
I have a .net interop project that uses an app.config file. When I am
I have a .NET deployment project. I would like to add a custom uninstall
I have a .net project that has a web reference to a service. I
I have a .net project (MySolution.Common) that uses the app.config. I am using the
I have a UserControl in my Asp.net project that has a public property. I
I have a .NET project which references another assembly that is built outside of
I have a VB.NET Windows Forms project that at one point paints text directly
I have a .NET 3.5 WinForms project that uses several 3rd party controls and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.