0

I'm writing some software in C Sharp and I'm having trouble. I am using an OpenFileDialog to get the location of a file. I do not actually open the file and read or write to it, I just need its address. When I go to open said file the "File in use error" pops up and wont let me proceeded with my selected file. Is there a way I can make the dialog ignore this message.

ThatOneGuy
  • 41
  • 2

1 Answers1

3

I figured it out.

by setting the OpenFileDialog.ValidateNames to false. It skipped the pop up. This should be fine because I'm not actually opening the file. Just closing the dialog box and storing the file path.

ThatOneGuy
  • 41
  • 2