我正在尝试选择已在quickbook软件中打开的文件.
代码:
OpenFileDialog ofdBrowseVInv = new OpenFileDialog(); ofdBrowseVInv.Title = "Locate QuickBook Company File"; ofdBrowseVInv.Filter = "QuickBook Company File (*.qbw,*.qbw)|*.qbw;*.qbm"; ofdBrowseVInv.FileName = ""; if (ofdBrowseVInv.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string strfilename = ofdBrowseVInv.InitialDirectory + ofdBrowseVInv.FileName; }
任何人都可以告诉我如何选择已经打开的文件…
解决方法
以下代码似乎有所帮助:
ofdBrowseVInv.ValidateNames = false;