Provides a standard set of Windows dialog boxes for opening and saving files and selecting colors and fonts, and printing. Can also display Help. Invisible at run time until called.
Properties
In addition to the properties listed below, a Control tab provides access to certain frequently used form properties for this control. See the Form Properties topic for information on those properties.
|
|
CommonDialog |
|
|
|
|
Open / Save As |
Displayed by ShowOpen and ShowSave methods. |
|
|
|
|
DialogTitle |
Name to display in the title bar. |
|
FileName |
Initial path and file name to use, if desired. |
|
InitDir |
Initial directory to use. If not present, current directory will be used. |
|
Filter |
Sting specifying the file extension. *.txt specifies all text files. Can specify more than one type. |
|
CancelError |
False (Default) - no error generated when user chooses the Cancel button. True - error is generated. |
|
Flags |
A numeric value that is a combination of numeric values for various flags (listed in purple color below) that are summed to create the Flags value. See Microsoft's MSDN documentation for numeric values for the following flags. |
|
AllowMultiselect |
User can select more than one file. |
|
CreatePrompt |
Prompts user to create file that does not exist. |
|
Explorer |
For '95 and 4.0: use Explorer-like Open A File dialog box template. |
|
ExtensionDifferent |
Indicates extension of returned filename is different from extension specified by DefaultExt. |
|
FileMustExist |
User must enter name of existing file. |
|
HelpButton |
Display help button. |
|
HideReadOnly |
Hides the Read Only check box. |
|
LongNames |
Use long file names. |
|
NoChangeDir |
Dialog will set current directory to what it was when dialog was opened. |
|
NoDereferenceLinks |
Do not dereference shortcuts (shell links). |
|
NoLongNames |
No long file names allowed. |
|
NoReadOnlyReturn |
Returned file won't have Read Only set and won't be in a write-protected directory. |
|
NoValidate |
Allows invalid characters in the returned filename. |
|
OverwritePrompt |
User must confirm to overwrite an existing file. |
|
PathMustExist |
User can only enter valid paths. |
|
ReadOnly |
Read only box checked by default. |
|
ShareAware |
Sharing violation errors will be ignored. |
|
|
|
|
DefaultExt |
Default filename extension, such as .txt or .mdb. |
|
MaxFileSize |
Integer specifying the maximum size of the filename in bytes. Default is 256. |
|
FilterIndex |
Specifies the default filter when using Filter property. First defined filter is 1. |
|
|
|
|
Color |
Displayed by ShowColor method. |
|
|
|
|
Color |
Returns or sets selected color. |
|
Flags |
A numeric value that is a combination of numeric values for various flags (listed in purple color below) that are summed to create the Flags value. See Microsoft's MSDN documentation for numeric values for the following flags. |
|
FullOpen |
Entire color dialog is shown. |
|
HelpButton |
Display a help button. |
|
PreventFullOpen |
Prevent definition of Custom Colors. |
|
RGBInit |
Initial color value for dialog box. |
|
|
|
|
CancelError |
False (Default) - no error generated when user chooses the Cancel button. True - error is generated. |
|
|
|
|
Font |
Displayed by ShowFont method. |
|
|
|
|
FontName |
Selected font name. |
|
FontSize |
Selected font size. |
|
Min, Max |
Smallest and largest font sizes. |
|
Flags |
A numeric value that is a combination of numeric values for various flags (listed in purple color below) that are summed to create the Flags value. See Microsoft's MSDN documentation for numeric values for the following flags. |
|
ANSIOnly |
Only those fonts that use Windows character set. |
|
Apply |
Enable the Apply button. |
|
Both |
List screen and printer fonts. |
|
Effects |
Enable strikethrough, underline and color effects. |
|
FixedPitchOnly |
Selects only fixed-pitch fonts. |
|
ForceFontExist |
Allow use only of fonts that exist. |
|
HelpButton |
Show help button. |
|
LimitSize |
Select only those fonts between Min and Max sizes. |
|
NoFaceSel |
No font name selected. |
|
NoSimulations |
Doesn’t allow GDI font simulations. |
|
NoSizeSel |
No font size selected. |
|
NoStyleSel |
No style was selected. |
|
NoVectorFonts |
Dialog does not allow vector-font selections. |
|
PrinterFonts |
List only those fonts supported by the printer. |
|
ScalableOnly |
List only scalable fonts. |
|
ScreenFonts |
List only screen fonts supported by this system. |
|
TTOnly |
List only True Type Fonts. |
|
WYSIWYG |
Allow only those fonts that are both printer and screen fonts. |
|
|
|
|
CancelError |
False (Default) - no error generated when user chooses the Cancel button. True - error is generated. |
|
Bold, Italic, Underline, Strikethru |
Set these properties by default. |
|
|
|
|
|
Displayed by ShowPrinter method. |
|
|
|
|
Copies |
Default number of copies to print. |
|
Flags |
A numeric value that is a combination of numeric values for various flags (listed in purple color below) that are summed to create the Flags value. See Microsoft's MSDN documentation for numeric values for the following flags. |
|
AllPages |
State of All Pages option button. |
|
Collate |
State of Collage check box. |
|
DisablePrintToFile |
Disable Print to File check box. |
|
HelpButton |
Show help button. |
|
HidePrintToFile |
Hide Print to File check box. |
|
NoPageNums |
Disable Pages option button and edit control. |
|
NoSelection |
Disable Selection option button. |
|
NoWarning |
Don't warn if no default printer. |
|
PageNums |
State of Pages option button. |
|
PrintSetup |
Show Print Setup dialog instead of Print dialog box. |
|
PrintToFile |
State of Print to File check box. |
|
ReturnDC |
Return device context for printer selection made. |
|
ReturnDefault |
Return default printer name. |
|
ReturnIC |
Return information context for printer selection made. |
|
Selection |
State of selection option button. |
|
UseDevModeCopies |
If printer driver doesn't support multiple copies, will disable the Number of copies spinner in Print dialog. |
|
|
|
|
FromPage, ToPage |
Default from and to page numbers. |
|
Min, Max |
Smallest number allowed in From box and the largest number allowed in the To box. |
|
Orientation |
Portrait or Landscape |
|
PrinterDefault |
True - Any changes user makes via Setup button will change printer defaults in the system registry. False - Setup selections in this dialog will not change system settings. |
|
CancelError |
False (Default) - no error generated when user chooses the Cancel button. True - error is generated. |
|
|
|
|
Help |
|
|
|
|
|
HelpContext |
HelpContextID: 0 - no context number >= 0 - a valid help context number. |
|
HelpKey |
String identifying keyword that identifies the Help topic. |
|
HelpFile |
Path and filename for Help file to use. |
|
HelpCommand |
A numeric value that is a numeric value representing one of the following options (in purple color). See Microsoft's MSDN documentation for numeric values for the following options. |
|
Command |
Execute a Help macro. |
|
Contents |
Display Help contents topic. |
|
Context |
Display Help for a particular context. |
|
ContextPopup |
Display in pop-up a Help topic identified by a context number. |
|
ForceFile |
Ensures WinHelp displays correct Help file. |
|
HelpOnHelp |
Show Help for total idiots, who need help on using Help. |
|
HelpIndex |
Display index of the given Help file. |
|
HelpKey |
Display Help for a particular keyword. |
|
PartialKey |
Search on partial keys and show matches, if any. |
|
HelpQuit |
Tell Help the given help file is no longer in use. |
|
SetContents |
Specify which Contents topic is shown when user presses the F1 key. |
|
SetIndex |
Used when more than one index per Help file (don't do this). |