Windows Common Dialogs
In Windows 95 and Windows NT, the dialog boxes for common functions such as
Open ,
Save , and
Find feature additional functionality and closer integration with the Windows 95 shell. You should use these dialog boxes where appropriate because they offer a high degree of consistency.
Note For more information, see the article "Using the Common Dialogs Under Windows 95" in the Microsoft Development Library.
The following common dialog boxes are implemented as the Microsoft Common Dialog Control 5.0 in Visual Basic.
File Open and Save As
The
File Open and
Save As common dialog boxes now offer direct browsing of the network, support for long file names , file links, direct manipulation transfers (such as drag-and-drop), and access to an object's pop-up menus .
Figure 12.8 The Save As dialog box Print Setup
The
Print Setup (also known as Choose Printer) dialog box displays the list of available printers. It provides controls for selecting a printersetting paper orientation, size , and sourceand selecting other printer properties such as status information for each printer.
Page Setup
The Page Setup dialog box is implemented as part of the
Print Setup dialog box in the Microsoft Common Dialog Control 5.0.
The Page Setup dialog box provides controls for specifying properties for page elements and layout, including page orientation, paper settings, and margins.
Font Properties
The
Font Properties dialog box displays the font properties of selected text. It also provides a
Font Info button, which gives the user information about the current font.
Color Dialog
The
Color Dialog is displayed by using the
ShowColor method of the CommonDialog control. The
Color Dialog box allows the user to select a color from a palette or to create and select a custom color.
To use the Color Dialog box, set the properties of the CommonDialog control relating to the Color dialog. Then use the ShowColor method to actually show the dialog and use the Color property to retrieve the selected color.
OLE Dialogs
When using Visual Basic, you can access some features of the OLE dialogs using the standard OLE control. However, for complete support you will need to make API calls. Windows supports the following dialogs:
- Insert Object (also known as Create New or Create From File)
- Change Icon
- Paste Special
- Convert
Converts a particular object instance to another class.
- Links (Link Properties)
Provides batch management of the links in the active container and displays the link source, link type, and update basis. This dialog allows the user to update, open, redirect, or break a link.
- Object Properties
Displays the properties of an object (new dialog).