1 / 13

Common Dialog Control

Common Dialog Control. The Common Dialog Control!!!. You want your user to set property or provide your application with some information easily? How do you do it?. Example. You want to prompt the user to open a file? How?

nubia
Télécharger la présentation

Common Dialog Control

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Common Dialog Control

  2. The Common Dialog Control!!! You want your user to set property or provide your application with some information easily? How do you do it?

  3. Example You want to prompt the user to open a file? How? You could use the File List Box control, the Drive List Control, the Directory List Box control working together, responding to events… It would require coding… OR We could use the Common Dialog Control and write three lines of code…

  4. What does the Common Dialog Control do? The Common Dialog control encapsulates functions for dealing with Files Printer Colors Font Help

  5. What is the Common Dialog Control? The common dialog control is an OCX that encapsulates the common dialog API calls built into the Windows Operating system.

  6. How Do I add the Common Dialog Control ? From the Project Menu – Choose Components From the Components Dialog choose the option Microsoft Common Dialog Control.

  7. Why Use the Common Dialog Control? These are common tasks that a user does all the time! The User sees these common dialogs all the time! The advantage here from the user’s point of view is that they already know how to use the dialogs. They don’t have to learn something new. LET’S LOOK AT THESE DIALOGS ONE AT A TIME….

  8. File Dialogs Input Properties: .InitDir – The initial directory folder .Filter - This property uses the “Prompt” – “Pattern” separated by the “|” character DEMO

  9. Font Dialog The Font dialog box allows the user to select a font by its size, color, and style. DEMO

  10. Color Dialog • The Color dialog box allows the user to select a color from a palette or to create and select a custom color. At run time, when the user chooses a color and closes the dialog box, you use the Color property to get the selected color DEMO

  11. Printer Dialog The Print dialog box allows the user to specify how output should be printed. The user can specify a range of pages to be printed, a print quality, a number of copies, and so on. This dialog box also displays information about the currently installed printer and allows the user to configure or reinstall a new default printer. Note:   This dialog box does not actually send data to a printer. It allows users to specify how they want data printed. You must write code to print the data in the format they select. DEMO

  12. Help Dialog The Help dialog uses the older help file format. It requires the file format of .HLP. It is not really used now. The new format for help files is the compiled HTML format or CHM which can be displayed using the HTML Help API. DEMO

  13. Conclusion The Common Dialog Control is useful control. It is easy to use and can sometimes save you some keystrokes.

More Related