Stock Properties

Your control inherited from the System::Windows::Form::Control class, and due to this, your control contains a lot of stock properties. In fact, not only do these properties exist, but you don't have to provide any implementation for them because they have already been implemented for you by the base class. Within your Visual C# project you just created, click the ShapeControl you added to the Windows Form within the Windows Form Designer. At the bottom-right area of the IDE, you should see a window named Properties. Within that window, you can see several stock properties that have been created for you already.

Scroll down the list of properties until you find the property named BackColor. Click the field of that property and ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.