VB.NET Dialog Boxes, File I/O, and Printing
Test your knowledge of standard dialog controls, StreamReader/StreamWriter file operations, and printing functionality in Visual Basic .NET.
Questions
Which is not a standard dialog box?
- ColorDialog
- FontDialog
- OpenDialog
- PrintDialog
- ZoomDialog
Why are standard dialog boxes used?
- They are easy to create.
- They provide functionality familiar to users.
- Developers can create their own versions of Dialog boxes.
- Both a and b.
- All of the above.
How are dialog boxes implemented in a program?
- A dialog box is generated programmatically.
- A dialog control is placed in the component tray.
- A dialog control is placed on the form.
- Both a and b.
- All of the above.
The standard prefix for a dialog control is:
- dal.
- dia.
- dil.
- dlc.
- dlg.
What is the method used to activate the color dialog box?
- ActivateDialog
- DisplayDialog
- ExhibitDialog
- ShowDialog
- StartDialog
The name of the class used to programmatically create a color dialog box is:
- Color
- ColorBox
- ColorDialog
- ColorDisplay
- ColorDisplayBox
The name of the class used to programmatically create a font dialog box is:
- Font.
- FontBox.
- FontDialog.
- FontDisplay.
- FontDialogBox.
Which OpenFileDialog control property specifies the choices in the "Files of type" dropdown box?
- FileName
- FileNames
- FileType
- Filter
- FilterIndex
Which property is the same in the OpenFileDialog and the SaveFileDialog control?
- FileName
- Filter
- InitialDirectory
- Both a and b.
- All of the above.
Which method is found in both the StreamReader and StreamWriter class?
- Close
- Peak
- Flush
- Both a and b.
- All of the above.
The StreamReader and StreamWriter class are both subclasses of which class?
- IO
- Stream
- StreamIO
- Both a and b.
- All of the above.
Which dialog control allows the user to zoom in on a document?
- PrintDialog
- PrintPreview
- PageSetupDialog
- Both a and b.
- All of the above.
Which dialog control has a Document property?
- PrintDialog
- PrintPreview
- PageSetupDialog
- Both a and b.
- All of the above.
Which object must be assigned to the Document property?
- Document
- DocumentPage
- DocumentPrint
- PageDocument
- PrintDocument
When is the PrintPage event activated?
- When the PrintDialog control is displayed.
- When an assignment is made to the Document property.
- The first time the Print method is called.
- Every time a page is printed after the Print method is called.
- None of the above.