File Explorer Tool in Visual Studio?

I have a C # project using window forms. I need the user to enter the location of the text file, so they will need to somehow view the files and folders, that is, the button that opens the file explorer. What tool (in the toolbar) will be in Visual Studio 2010? I tried DirectoryEntry and DirectorySearcher, but this just adds something below:

enter image description here

+6
source share
3 answers

It is not so easy. You want to open the file open dialog. You will need to add a button, and then open a dialog in the button handler.

OpenFileDialog fdlg = new OpenFileDialog(); if(fdlg.ShowDialog() == DialogResult.OK) { // do something here with fdlg.FileName ; } 

a source

+7
source

This is the "Dialogs" section. Look for OpenFileDialog or one of the others (according to your needs)

enter image description here

+1
source

You can also use the OpenFileDialog component http://msdn.microsoft.com/en-us/library/61097ykx.aspx

0
source

Source: https://habr.com/ru/post/912773/


All Articles