Reputation: 1467
I am trying to select the file which is already opened in quickbook software.
code :
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;
}
After selecting the file .. i am getting message : File in use
can any one tell me how can i select the file which is already opened...
Upvotes: 8
Views: 3291
Reputation: 29
This code worked for me perfectly.
ofdBrowseVInv.ValidateNames = false;
Upvotes: 1
Reputation: 1825
The following code seems to help:
ofdBrowseVInv.ValidateNames = false;
Upvotes: 11