1
votes

How do I allow the OpenFileDialog to select a file already open in another application?

Currently it does NOT allow me to select a file already open. I simply need the file path, I am not actually trying to open the file (as its already open) but the OpenFileDialog component will not let me get the file path as it throws an error about the file already being open.

Update 1: By thow an error I mean to say it pops up another dialog window that says...

"This file is in use. Enter a new name or close the file that's open in another program"

1
What's the stack trace? - SLaks
No Stack Trace... I get a dialog window that says "Title=Open, Content=<selected file name>\r This file is in use. \r Enter a new name or close the file that's open in another program" - Charles
@AmatuerDev Thank-you. - Charles

1 Answers

3
votes

Use the ValidateNames property. Set it to false.