Types of Common Dialog Controls


1. OpenFileDialog control
2. SaveFileDialog control
3. FontDialog control
4. ColorDialog control
5. FolderBrowserDialog control
6. PageSetupDialog control
7. PrintDialog control

1)OpenFileDialog control

This is used  to display, open file dialogue box to the user, so that user can select any file to open

Properties with OpenFileDialog control

SNO
Property and options
Type
Description
01
FileName
string
Sets or gets the name  of the file including the path selected by the user with in the OpenFileDialog Box
02
Filter
string
Used to filter the files like text files, word files, excel files, all files

Using Filter Property is like: Open file dialog1.filter=”Filter expression”

Filter Expression Contains 2 parts separated by the | (pipe) symbol

Display Text | Filter criteria
Text files       | *.txt
Word files     | *.doc
Excel files     | *.xls
All files         | *.*

Ex: Open file dialog1.filter=”Text Files | “*.txt” | Word Files |*.doc | Excel Files | *.xis | All Files | *.*

2)SaveFileDialog control

This control is used to display, save file dialog box to the user, so that user can enter any file name to save

Properties with SaveFileDialog

SNO
Property and options
Type
Description
01
FileName
string
Sets or gets the name of the file including the path selected by the user with in the OpenFileDialog box
02
Filter
string
Used to filter the files like text files, word files, excel files, all files etc

3)FontDialog control

This control is used to display, font dialog box to the user, so that user can required font attributes to apply to the required data or others

Properties with FontDialog

SNO
Property and options
Type
Description
01
Font
object
Sets or gets the font attributes selected within the FontFileDialog control
02
MaxSize
int
Used to set the maximum font size, that is to be displayed to the user within the font dialog control
03
MinSize
int
Used to set the minimum font size, that is to be the user with in the  font dialog control
04
ShowEffects
bool
True: User can access show effects options with in the font dialog control
False: User cannot access show effects options with in the font dialog control

4)ColorDialog control

This control is used to display, color dialog box to the user, so that can select required color to apply to the required data or other controls etc

Properties with ColorDialog

SRNO
Property and options
Type
Description
01
Color
struct
Sets or gets the color value selected within the ColorDialog control
02
AllowFullOpen
int
True: User can access define custom colors button within the color dialog control
False: User cannot access define custom colors button within the color dialog control
03
FullOpen
int
True: Color dialog box is opened in full mode
False: Color dialog box is opened in partial mode

5)FolderBrowserDialog control

This control is used to display, folder browser dialog box to the user, so that user can the required folder

Properties with FolderBrowserDialog:

SNO
Property and options
  Type
                     Description
01
SelectedPath
string
Sets or gets the path of the folder selected by the user

6)PageSetupDialog control

This control is used to display, print dialog box to the user, so that user can set required options for printing any file


Properties with PageSetupDialog

SNO
Property and options
Type
Description
01
Document
PrintDocument class Object
Gets or sets a value indicating the PrintDocument to get page settings from

7)PrintDialog control

This control is used to display, Print dialog box to the user, so that user can set required options for printing any file

Properties with PrintDialog

SNO
Property and options
   Type
              Description
01
Document
PrintDocument class Object
Gets or sets a value indicating the PrintDocument used to obtain Printing settings

No comments:

Post a Comment