Home > Net > OpenFileDialog FolderBrowserDialog and demonstrate it, but can't open the file
OpenFileDialog FolderBrowserDialog and demonstrate it, but can't open the file
Time:01-29
According to the tutorial has written two programs, a use OpenFileDialog, a use FolderBrowserDialog, have succeeded in the pop-up folder box, but can't open the folder the file below, is this the two classes are only used for making a presentation? I hope I can open the program runs the local folders, and open the file below it, could you tell me me what should I do?
CodePudding user response:
What do you think about it, called open?
CodePudding user response:
The two just to choose the files and directories, need to do anything to you after ShowDialog ()==true after processing Do you think about it, when you select a file, your program is expected to do? For instance you want to select files uploaded to the server, or you want to send this file in one line read, then save the database, if you do not say, procedure how to know what you want to do?
CodePudding user response:
Var DLG=new OpenFileDialog (); If (DLG) ShowDialog==true)//WPF is a bool? Language is the winform, DialogResult { Var fileName=DLG. FileName; //todo: do you know the user to select the file name, what do you want to do next? //such as: printed to the console: Console. WriteLine (fileName); //other actions according to your needs for processing
}
CodePudding user response:
I don't know the building Lord want to do? But your request can write so,