2
我正在使用WPF Win32文件瀏覽器對話框來選擇文件系統中的文件。現在我的問題是,當我選擇以.ink結尾的快捷方式文件時,它顯示的應用程序路徑不是快捷方式(.ink)路徑。Wpf文件瀏覽器對話框選擇快捷方式文件
比如我要選擇窺探快捷
的文件路徑,我已經得到了。
我怎樣才能得到快捷而不是應用程序的路徑?
更新 我試圖用
Win32.OpenFileDialog ofd = new Win32.OpenFileDialog();
ofd.Filter = "Link (*.lnk)|*.lnk";
限制,但只有.LNK也可以選擇。應該可以選擇其他文件,而不僅僅是.lnk文件。
相關:http://stackoverflow.com/questions/15758941/how-to-get-the-current-目錄路徑的應用程序快捷方式和http://stackoverflow.com/questions/9414152/get-target-of-shortcut-folder – 2014-09-22 07:06:40
這通常是如何捷徑的作品,請嘗試http://stackoverflow.com/questions/ 2350802/can-the-net-openfiledialog-be-setup-to-allow-the-user-to-select-a-lnk-file to get the lnk file本身 – pushpraj 2014-09-22 07:08:30