Creating Non-Visual Controls

In Visual Basic 6.0, some controls (such as Timer) were non-visual, meaning they had no user-interface aspect. Although these controls were placed directly onto the form, just like any other control, they were only visible at design time. In Visual Basic .NET, non-visual controls are still common (the Timer is still around, for example), but they are referred to as components. Instead of going directly onto the form, they sit in a special area (commonly known as the component tray) below the main design window (see Figure 8.4).

Figure 8.4. Non-visual controls, or components, appear in their own special area of the Windows Forms designer.

To create a non-visual control yourself, you need to inherit from System.ComponentModel.Component ...

Get Microsoft® Visual Basic® .NET 2003 Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.