Академический Документы
Профессиональный Документы
Культура Документы
Slide 1 of 13
Session 5
Dialog Boxes
9/12/2013
Slide 2 of 26
Module Introduction
+ A dialog box is a special window, which can be used to interact with the user and display information.
9/12/2013
Slide 3 of 26
9/12/2013
Slide 4 of 26
Elements
A dialog box consists of: Title bar displaying caption and the close icon Instruction text informing what the user should do (optional) Content with controls to select or display information Action area having buttons and link labels Footnote area explaining about the window (optional)
9/12/2013
Slide 5 of 26
Features
A dialog box is different from forms because of some basic features. These are: + Non-resizable: A dialog box is not resizable and cannot be maximized or minimized. + Usually Modal: A dialog box is usually of modal type. This means that the user is not allowed to focus on any other window until the dialog box is closed. + Common Set of Buttons and Icons: a dialog box consists of some standard buttons such as OK and Cancel.It also consists of the Help and Close icons on its top-right corner.
9/12/2013
Slide 6 of 26
9/12/2013
Slide 7 of 26
+ Common dialog boxes are system-defined dialog boxes such as Open, Save and Print. These dialog boxes are reusable and hence can be used across various applications. + Custom dialog boxes are user-defined dialog boxes. These dialog boxes are useful when the system-defined dialog boxes do not fulfill certain requirements.
9/12/2013
Slide 8 of 26
"CommonDialog" Class
The CommonDialog class is the base class for all common dialog boxes. This class exists in the System.Windows.Forms namespace.
9/12/2013
Slide 9 of 26
"ColorDialog" Component
The ColorDialog component is a dialog box that allows you to select system-defined colors from the color palette.
9/12/2013
Slide 10 of 26
"ColorDialog" Class
9/12/2013
Slide 11 of 26
"FontDialog" Component
The FontDialog component allows you to select different fonts that are installed in the system.
9/12/2013
Slide 12 of 26
"FontDialog" Class
9/12/2013
Slide 13 of 26
9/12/2013
"OpenFileDialog" Class
Slide 14 of 26
9/12/2013
Slide 15 of 26
"SaveFileDialog" Class
9/12/2013
Slide 16 of 26
"PageSetupDialog" Component
The PageSetupDialog component is a system-defined dialog box, which allows the user to set the page layout for printing. It provides various options such as the border and margin adjustments, headers and footers, and portrait and landscape orientation for the page to be printed.
9/12/2013
Slide 17 of 26
"PageSetupDialog" Class
9/12/2013
Slide 18 of 26
"PrintDialog" Component
The PrintDialog component is a system-defined dialog box that allows you to print the documents.
9/12/2013
Slide 19 of 26
"PrintDialog" Class
9/12/2013
Slide 20 of 26
"PrintPreviewDialog" Control
The PrintPreviewDialog control is used to display the way a document will appear when printed.
9/12/2013
Slide 21 of 26
"PrintPreviewDialog" Class
9/12/2013
Slide 22 of 26
9/12/2013
Slide 23 of 26
9/12/2013
Slide 24 of 26
"DialogResult" Enumeration