Questions tagged [openfiledialog]

The OpenFileDialog is a (component) class in the .NET Framework that prompts the user to open one or multiple files.

The OpenFileDialog component allows users to browse the folders of their computer or any computer on the network and select one or more files to open. The dialog returns full path names of the files selected by user.

1068 questions
-5
votes
2 answers

How to use OpenFileDialog

I'm using C# to open a text file then I read everything inside it with this code: OpenFileDialog pic = new OpenFileDialog(); pic.ShowDialog(); System.IO.StreamReader file = new System.IO.StreamReader(pic.OpenFile()); a=file.readline(); After I've…
-7
votes
3 answers

OpenFileDialog is not opening the file

I have bound the openFileDialog control with button. On button event, I am calling the openFileDialog control. Now, when I am running my application, the openFileDialog box gets open but does not select the file. The open button is not…
Ashish Sharma
  • 131
  • 1
  • 5
  • 19
-8
votes
1 answer

Open File Dialog not working in c#!

private void button3_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "Music|*.mp3"; if(ofd.ShowDialog()==DialogResult.OK) { SoundPlayer sp = new…
Saurab
  • 1
1 2 3
71
72