AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

GetSaveFileName

The GetSaveFileName function creates a Save common dialog box that lets the user specify the drive, directory, and name of a file to save.

VB4-32,5,6
Declare Function GetSaveFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long

VB.NET
System.Windows.Forms.SaveFileDialog

Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later

Library
Comdlg32

Parameter Information
∑ lpofn
Pointer to an OPENFILENAME structure that contains information used to initialize the dialog box. When GetSaveFileName returns, this structure contains information about the userís file selection.

Return Values
If the user specifies a filename and clicks the OK button, the return value is nonzero. The buffer pointed to by the lpstrFile member of the OPENFILENAME structure contains the full path and filename specified by the user.

If the user cancels or closes the Save dialog box or an error occurs, the return value is zero. To get extended error information, call the CommDlgExtendedError function, which can return one of the following values:
CDERR_FINDRESFAILURE, CDERR_NOHINSTANCE, CDERR_INITIALIZATION, CDERR_NOHOOK, CDERR_LOCKRESFAILURE, CDERR_NOTEMPLATE, CDERR_LOADRESFAILURE, CDERR_STRUCTSIZE, CDERR_LOADSTRFAILURE, FNERR_BUFFERTOOSMALL, CDERR_MEMALLOCFAILURE, FNERR_INVALIDFILENAME, CDERR_MEMLOCKFAILURE, FNERR_SUBCLASSFAILURE

Examples

Related Functions

No VB.NET Example Found

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/