This Book s Approach

function OpenWin(url, w, h) { if(!w) w = 400; if(!h) h = 300; window.open(url, "_new", "width=" + w + ",height=" + h + ",menubar=no,toobar=no,scrollbars=yes", true); }

This Book's Approach

To gain an understanding of what it takes to build controls for Windows Forms, this book takes a sample-based approach. The first control presented is a simple IconButton control. The IconButton control acts as a standard Windows Forms button, and in addition it allows for an icon image to be displayed on the control (see Figure 1).

Figure 1. The IconButton control developed in Chapters 2 and 3.

figure 1. the iconbutton control developed in chapters 2 and 3.

The IconButton serves as our first foray into custom control development. Although not very complicated, it shows how to get started with building controls and using the various services offered by VS .NET for control development.

With the basics of control development covered, we'll move on to advanced control development topics, including designer services, design-time verses runtime behavior, serialization, and licensing. To explore these topics, we'll develop an OutlookBar control, which is similar to the custom control found in MS Outlook. Figure 2 shows the OutlookBar control we will develop as the advanced sample for this book.

Figure 2. An advanced control, the OutlookBar.

figure 2. an advanced control, the outlookbar.

After you understand the concepts and tasks related to developing the IconButton control and the OutlookBar control, you will be well equipped to create other custom controls. You'll learn that the necessary requirements for creating custom controls are the development of a sense of flair and style, and, of course, knowledge of the requirements for building controls. This book arms you with that knowledge, and hopefully you will confidently develop your own sense of style with the knowledge and experience you gain from the samples in this book.

Again, the main goal of this book is to teach by example. I've packed as much code as possible into each section, including the appendix, which deals with Extender Providers. The code provided serves as a stepping-stone from which to extend the provided controls or to use as the building blocks for new controls.

Each chapter builds on the concepts and code examples of the preceding chapter. The controls built over the course of this book represent a starting point on which you should expand by adding your own features and support. The goal is to cover key concepts rather than extraneous features that don't contribute to understanding the process of custom control development.



    .NET Windows Forms Custom Controls
    User Interfaces in VB .NET: Windows Forms and Custom Controls
    ISBN: 1590590449
    EAN: 2147483647
    Year: 2002
    Pages: 74

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net