如何在打开的文件上使用 OpenFileDialog

How to use OpenFileDialog on Open File

如何允许 OpenFileDialog select 已在另一个应用程序中打开的文件?

目前它不允许我select一个已经打开的文件。我只需要文件路径,我实际上并没有尝试打开文件(因为它已经打开)但是 OpenFileDialog 组件不会让我获取文件路径,因为它会抛出关于文件已经打开的错误。

更新一: 通过抛出一个错误我的意思是说它弹出另一个对话框 window 说...

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

使用ValidateNames属性。将其设置为 false.