Copyright © 2006-2019 MultiMedia Soft

CommonDialogShowSave method

Previous pageReturn to chapter overviewNext page

Remarks

 

Displays the standard dialog box used to select a file for saving. This method allows accessing filenames containing Unicode characters from development environments whose common dialog components don't manage Unicode natively like the "Microsoft Common Dialog Control" (ComDlg32.ocx) used by Visual Basic 6.

 

After choosing a destination file, you can access more detailed information about it through the CommonDialogGetInfoFromLastSave method.

 

 

Syntax

 

[Visual Basic]

Public Function CommonDialogShowSave (

strDialogTitle as string,

strInitialDirectory as string,

strFilter as string,

nFilterIndex as Int32

) as String


 

[C#]

public string CommonDialogShowSave (

string strDialogTitle,

string strInitialDirectory,

string strFilter,

ref Int32 nFilterIndex

);


 

[C++]

public: string CommonDialogShowSave (

string strDialogTitle,

string strInitialDirectory,

string strFilter,

Int32 __gc *nFilterIndex

);


 

 

Parameter

Description

 

 

strDialogTitle

String representing the caption text of the dialog box.

strInitialDirectory

String representing the path of the directory where the browsing starts from.

strFilter

String representing the filter that let users limit which filenames appear for selection. For example:

"MP3 Files (*.mp3)|*.Mp3|WMA Files (*.wma)|*.wma"

nFilterIndex

Reference that, on return from the method call, will contain the 1-based index of the filter selected by the user.

 

 

Return value

 

Value

Meaning

 

 

Empty string

The user pressed the Cancel button or didn't selected any file.

Valid string

The absolute pathname of the chosen file.