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 6157745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:50:16+00:00 2026-05-23T20:50:16+00:00

We want to prevent the user from doing anything except selecting a folder. We

  • 0

We want to prevent the user from doing anything except selecting a folder. We don’t want to allow him to delete files/folders, rename them, access the context menu, etc. But we can’t override anything since FolderBrowserDialog is sealed.

We googled around and found some solutions:

  • Implement our own FolderBrowserDialog: Don’t have time for this, only acceptable as last resort
  • This guy did it for an OpenFileDialog, might work but seems a little overkill

Anyone faced this problem and found an optimal solution for this? It must be .NET 4.0 compatible

  • 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-23T20:50:18+00:00Added an answer on May 23, 2026 at 8:50 pm

    In the end, we solved it implementing our own control. It was a lot simpler than we thought. In short, we just made a class inherit from System.Windows.Forms.Form, with a System.Windows.Forms.TreeView on the left and a System.Windows.Forms.ImageList on the right to show the current folder’s contents. Then we DllImport’ed SHGetFileInfo and ExtractIconEx from Shell32 in order to make the TreeView and ImageList’s icons look like Explorer’s, and voila!

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

Sidebar

Related Questions

I want to prevent the user from maximizing the Windows Form to full screen
I have an HTML textarea element. I want to prevent a user from entering
I am working on a ASP.NET application. I want to prevent the user from
I'm doing things as said in How do I prevent the user from changing
I want to prevent my asp.net / c# 2008 web pages from being cached
I want to be able to prevent users from uploading low quality images to
I have a search query from the user and I want to process it
Is there any way I can prevent the user from hitting the return key
We want to prevent other users from editing other users profile, still allowing a
I want to generate 32x32 sized thumbnails from uploaded images (actually avatars). To prevent

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.