c# - How to select the file which is already opened using OpenFileDialog -


i trying select file 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 file .. getting message : file in use

can 1 tell me how can select file opened...

file in use screen shot

the following code seems help:

ofdbrowsevinv.validatenames = false; 

see more here http://social.msdn.microsoft.com/forums/vstudio/en-us/56fbbf9b-31d5-4e89-be85-83d9cb1d538c/openfiledialog-this-file-is-in-use?forum=netfxbcl


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -