Consultor Eletrônico



Kbase P145891: Microsoft File Open Dialog .NET control shows different current directory during FileOK event handle
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/6/2009
Status: Unverified

SYMPTOM(s):

Using the Microsoft File Open Dialog .NET control

Checking current working directory before, during and after display of file open dialog

Before and after the dialog is displayed the current directory is the application start in directory

During execution of the file open dialog, the controls FileOK event is fired when the user picks a file

The file being picked is in a different directory

Displaying the current directory from within the FileOK event handler shows the directory where a file was selected from when running under Windows XP

Displaying the current directory from within the FileOK event handler shows the application start in directory when running under Windows Vista

The behavior, although different depending on the operating system being used, is the same when running an application built using Visual Studio 2008

FACT(s) (Environment):

OpenEdge 10.2A
Windows XP
Windows Vista

CAUSE:

The exact cause is unknown. The behavior is specific to Windows Vista and is out of our control.

FIX:

Use the FileName property of the File Open Dialog control to return the complete file name selected by the user.