-->

Common Dialog Box/Controls


  1. You can use set of predefined standard dialog boxes in your projects for such tasks as specifying colors and fonts, printing, opening and saving. The common dialog boxes control, which is a custom control, allows your project to use the dialog boxes that are provided as a part of the Windows environment.
  2. To use the common dialog control, you first place a control, and its location doesn’t matter, you can not change size of the control, since it will be invisible when your program will run.
  3. In code when you wish to display one of the standard dialog boxes, you refer the properties and methods of the control.
NOTE :-You don’t need more than one dialog control on your form.
Following dialog boxes are provide by Microsoft Common Dialog Box :-
1. Color Dialog Box:
Color dialog box which can be used for user to select color from the  common dialog box. You can assign 
the values selected by user to con-trols in your project. 
2. Font Dialog Box:
Font Dialog Box allows user to sel-ect his custom font setting like,  font name, font size, font color,  font style, strike through etc.
But before using the ShowFont method you first initiate the flag property for font that is cdlScreenFont.

3. Save Dialog Box:
Visual Basic even provides save file dialog box which displays a save file dialog box to get the path for file to save.

4. Open Dialog Box:
Open Dialog Box use for open a file in a project which display a open dialog box for open a already existing file in a system.
5. Printer Dialog Box:
Printer Dialog Box use print a file or a document.

Methods of Common Dialog Boxes
ShowOpen: Shows a File Open dialog box.
ShowSave: Shows a File Save dialog box.
ShowColor: Shows a Select Color dialog box.
ShowFont: Shows a Font Selection dialog box.
ShowPrinter: Shows a Print/Print Options dialog box.