Questions tagged [folderbrowserdialog]

FolderBrowserDialog is a class in the System.Windows.Forms.CommonDialog namespace

Prompts the user to select a folder.

Docs

280 questions
87
votes
1 answer

Using environment variable in a file path

I've got an environment variable set that points to a specific folder (call it MYFOLDER for example). When typing in %MYFOLDER%\SubFolder into windows explorer the subfolder appears. However, when I pass SelectedPath = @"%MYFOLDER%\SubFolder"; to a…
Flynn1179
  • 11,925
  • 6
  • 38
  • 74
81
votes
16 answers

Why FolderBrowserDialog dialog does not scroll to selected folder?

As show in this screen shot, the selected folder is not in the view. It needs to be scrolled down to view the selected folder. Same dialog shows selected folder visible on different computer I ran it on two computers both having windows 7. It…
Munawar
  • 2,588
  • 2
  • 26
  • 29
76
votes
12 answers

Select folder dialog WPF

I develop a WPF4 application and in my app I need to let the user select a folder where the application will store something (files, generated reports etc.). My requirements: Ability to see the standard folder tree Ability to select a folder WPF…
Mike
  • 14,010
  • 29
  • 101
  • 161
48
votes
2 answers

Using FolderBrowserDialog in WPF application

I have a WPF application that I need to have users access directories in. I have searched to the end of the world on how to integrate windows forms into WPF and have found all kinds of information on how to integrate form controls into my xaml,…
david
  • 726
  • 1
  • 5
  • 10
39
votes
3 answers

How to reference System.Windows.Forms in .NET Core 3.0 for WPF apps?

I'm migrating my WPF desktop app from .NET Framework to Core 3.0. I was using System.Windows.Forms.FolderBrowserDialog() and I'm now stuck on how to add this reference to the Core project. There is no "System.Windows.Forms" NuGet package available,…
yaugenka
  • 2,602
  • 2
  • 22
  • 41
34
votes
9 answers

How to get file path from OpenFileDialog and FolderBrowserDialog?

Hey there i started learning C# a few days ago and I'm trying to make a program that copies and pastes files (and replaces if needed) to a selected directory but I don't know how to get the directory and file paths from the openfiledialog and…
user3728981
  • 415
  • 1
  • 4
  • 7
33
votes
7 answers

Exception when using FolderBrowserDialog

I'm getting the following Exception when trying to use FolderBrowserDialog: System.Threading.ThreadStateException: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has…
Daniel
  • 6,595
  • 9
  • 38
  • 70
25
votes
4 answers

Can I change the title of my FolderBrowserDialog?

I'm curious and it could give my little app a nice finishing touch. Thanks!
Sergio Tapia
  • 40,006
  • 76
  • 183
  • 254
20
votes
3 answers

Show detailed Folder Browser from a PropertyGrid

Please note it is not a duplicate question. How to show a detailed FolderBrowser as in the image below from a PropertyGrid (from the field/property which has ellipses ...) Using [EditorAttribute(typeof(System.Windows.Forms.Design.FileNameEditor),…
dushyantp
  • 4,398
  • 7
  • 37
  • 59
17
votes
4 answers

Alternative to FolderBrowserDialog

Is there an alternative for selecting folders in C#? Optimally I'd like to use the OpenFileDialog to select folders, or at least something similar to that.
NMunro
  • 1,282
  • 4
  • 18
  • 33
14
votes
1 answer

Required Dialog for selecting Multiple Files and Folders .NET

I thought it would be easy to find, I was wrong. Dialog Requirements: Can browse MULTIPLE FILES/FOLDERS in the same time. Can be used in .NET windows forms. FREE or can be used under GPL. Works in Win Xp and Win 7. Dialog Preferences: C# Looks…
watbywbarif
  • 6,487
  • 8
  • 50
  • 64
14
votes
4 answers

Folder browser dialog in Qt

Is there any way to open a folder browser dialog in Qt? When I use QFileDialog with Directory file mode, even if I specify the ShowDirsOnly option, I get the standard file dialog. I would prefer to use a dialog that asks the user to choose a…
Vojislav Stojkovic
  • 8,043
  • 4
  • 35
  • 48
12
votes
4 answers

C# - WPF - getting folder browser dialog without using System.Windows.Forms?

I have this WPF app and I want to have there function of getting a directory path from the user. I would like to use some folder browser dialog but I don't want to implement it from System.Windows.Forms or use some huge script inside. Is there some…
Ms. Nobody
  • 1,219
  • 3
  • 14
  • 34
12
votes
2 answers

FolderBrowser with textbox in VB.NET

I have a textBox which gets filled with a path, acquired from a database (but that's irrelevant). So I want to have a FolderBrowserDialog button where I open -> navigate through the folders and select a path (i.e. by selecting a certain folder) and…
Milkncookiez
  • 6,817
  • 10
  • 57
  • 96
9
votes
3 answers

Bizarre FolderBrowserDialog behaviour

I'm supporting an old version of a C# application, running on .NET 3.5. We've found an issue with the FolderBrowserDialog on Windows Vista (either 32 or 64-bit). Basically what happened is that the dialog would appear, but only the root Desktop node…
Alexander R
  • 2,468
  • 24
  • 28
1
2 3
18 19