WinXP CommonDialog VB6 opening in wrong directory

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a VB6 application compiled on Win98 which is running perfectly on Win98, but poorly on WinX

The application uses the CommonDialog control to open filtered files in one of 6 folders ( specific directory paths), depending on the file suffix. Each event which shows the "open file box" is assigned a specific initial directory which should appear at the top of the open file window

In Win98, all folders appear as expexted. there are no problems. For example, events looking for files named "****.JOB" show the file open window for directory C:\Jobs. Events looking for files named "*****.Quotes" show the file open window for directory C:\Quotes.

InWinXP, any first attemt to show a file_open window works as intended, but any subsequent attemt to show a file_open window returns to the directory from which the first file was opened. It is as if a flag is set to look to the first directory used to open a file, regadless of the VB6 Inital Directory statemnets for each event

Rather than using multiple code revisions to find a way to work around this, is there a WinXP CommonDialog setting I can revise which would let our code work as intended. If so, Please provide very detail instuctions on how to accomplish this

Thank yo
 
Try using the GetOpenFileName api and not the CommonDialog (OCX) The code
to wrap this api is simple.

Saber said:
I have a VB6 application compiled on Win98 which is running perfectly on Win98, but poorly on WinXP

The application uses the CommonDialog control to open filtered files in
one of 6 folders ( specific directory paths), depending on the file suffix.
Each event which shows the "open file box" is assigned a specific initial
directory which should appear at the top of the open file window.
In Win98, all folders appear as expexted. there are no problems. For
example, events looking for files named "****.JOB" show the file open
window for directory C:\Jobs. Events looking for files named
"*****.Quotes" show the file open window for directory C:\Quotes.
InWinXP, any first attemt to show a file_open window works as intended,
but any subsequent attemt to show a file_open window returns to the
directory from which the first file was opened. It is as if a flag is set to
look to the first directory used to open a file, regadless of the VB6 Inital
Directory statemnets for each event.
Rather than using multiple code revisions to find a way to work around
this, is there a WinXP CommonDialog setting I can revise which would let our
code work as intended. If so, Please provide very detail instuctions on how
to accomplish this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top