Basic Control DebuggingBy now you may be wondering how to debug controls, designers, and editors. As with any class library project, there needs to be an application that will use the library. This application can be set as the startup program for debugging purposes. In the case of designers and editors, VS .NET provides the solution. In the project properties, set the Start Application to devenv.exe , as shown in Figure 5.9. Figure 5.9. Debugging setup. Now when the project is executed, a new instance of VS .NET will be launched. This will allow for setting break points within the control, designer, and editor. |
Summary This chapter The |
Chapter 6 - Control Design ConceptsIN THIS CHAPTER
Building quality custom controls requires knowledge and practice. During the development process, there is a time of discovery. This discovery process includes learning the underlying system, the framework, and the most practical design for the control in order to provide a clear strategy for moving the project forward. To grow knowledge, there must be a starting point from which to begin. The Windows Forms base class library can be used as such a starting point.
By
Before this chapter delves into designing and building the
OutlookBar
control, its subcomponents, and
It is necessary to understand how the common controls shipped with VS .NET are
|
Control Design
All
Users of Visual C++ and MFC (Microsoft Foundation Classes) have some basic UI elements afforded to them, such as simple docking toolbars. However, advanced UI elements such as those found in the latest edition of MS Office and VS .NET are not to be found within any provided framework or .NET classes. If you want your application to resemble a Microsoft application, you will have to purchase a set of libraries from a third-party vendor or create your own set of UI classes. As with any type of project, certain criteria should be followed when creating custom UI elements. These are the criteria:
Did I mention that it needs to look cool? After all, if you want your control to be noticed, it has to have a sexy wrapper. Consider the menus in VS .NET verses the standard menus available as part of Windows Forms development. Figure 6.1 shows a side-by-side comparison of these two menus. Figure 6.1. A menu comparison—VS .NET on the left, boring on the right.
Both menus shown in Figure 6.1 provide the same functionality; however, users looking at the two will believe that somehow, in some way, the
Of course, if the control only looks cool but does not offer any functionality, it is useless. Creating a nice-looking control will get a developer's attention, and providing a useful control will get developers to actually use the control. |