What makes components useful is that they can be manipulated in the design-time environment. The Timer component fires an event at a set interval measured in milliseconds. Chapter 8: Controls shows how to use them. The ImageList component keeps track of a developer-provided list of images for use with controls that need images when drawing. For an example, see Appendix D: Standard WinForms Components and Controls. The NotifyIcon component puts an icon on the shell's TaskBar, giving the user a way to interact with an application without the screen real estate requirements of a window. The ErrorProvider, HelpProvider, and ToolTip components provide the user with varying degrees of help in using a form and are covered in Chapter 2: Forms. They're both covered in detail in Chapter 2: Forms. The MainMenu and ContextMenu components provide a form's menu bar and a control's context menu. The printing- related components are covered in detail in Chapter 7: Printing. The ColorDialog, FolderBrowserDialog, FontDialog, OpenFileDialog, PageSetupDialog, PrintDialog, PrintPreviewDialog, and SaveFileDialog classes make up the bulk of the standard components that WinForms provides. It's so useful to be able to create instances of nonvisual components and use the Designer to code against them that WinForms comes with several components out of the box: Locations of Components and Controls Hosted on a Form Figure 9.1 shows the difference between a hosted control and a hosted component. Dropping a component onto a design surface makes it available to set the property or handle the events in the Designer, just as a control is. A component can show up on the Toolbox along with controls and can be dropped onto any design surface. NET class that integrates with a design-time environment such as VS.NET. What makes a control special is that it's one kind of component : a. Recall from Chapter 8: Controls that controls gain integration into VS.NET merely by deriving from the Control base class in the namespace.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |