O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reusing the .NET Framework Class Library with Inheritance

Many of the classes in the .NET Framework class library have been designed to be base classes from which we are meant to derive new classes in our code. The System.Windows.Forms.Form (from now on simply referred to as Form) class is a core class for writing Windows GUI applications in .NET. Anybody who wants to write Windows GUI applications must derive classes from this base class.

Listing 16.7 demonstrates how easy it is to draw a window similar to that shown in the sample output after the listing by deriving a class from the Form class. Even though the displayed window looks a bit empty, it nevertheless has all the capabilities that we have come to expect from a standard window. For ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required