|
Do you get frustrated trying to add graphics
to you .NET Windows Forms applications? Learning to use the
.NET graphics classes is not easy. Managing the graphics you
create with the classes increases the amount of code you
need to write.
There was a line and shape control for creating graphics in
Visual Basic before .NET. It was widely used by developers to easily decorate
the Windows Forms they created with graphics. It was easy to use.
The line and shape control was missing-in-action in Visual
Basic for .NET 2002 and 2003.
For Visual Basic 2005, Microsoft has provided a Power Pack
that adds line and shape controls to Visual Studio 2005. The Power Pack includes
controls that enable you to draw lines, ovals, and rectangles on forms and
containers at design time.
These controls provide an easy way to decorate a Windows Forms
with graphics just like the VB6 line and shape control.
And, the Power Pack controls introduce powerful new features
to the shapes such as events. With events you can change the appearance of
graphics at runtime based on events occurring in the application. This
adds a whole new dimension to line and shape controls. For example, add click
and double-click events allow developers to respond and interact with end
users.
The new Line and Shape controls included in this version of
the Visual Basic 2005 Power Packs are a set of three graphical controls that
enable you to draw lines, ovals, and rectangles on forms and containers at
design time.
Line and Shape controls encapsulate many of the graphics
methods that are contained in the System.Drawing namespace. This enables you to
draw lines and shapes in a single step
without having to create graphics objects, pens, and brushes. Complex
graphics techniques such as gradient fills can be accomplished by just setting
some properties.
Download and Try the Visual Basic Power Pack Line and Shape
Controls
Download an installer at:
Microsoft Visual Basic 2005 Power Packs 2.0
During installation line and shape control Help is installed
installed. To learn how to use the line and shape controls search Visual
Studio help for this topic:
Introduction to the
Line and Shape Controls
Also during installation, a Visual Studio PowerPacks v2.0
Toolbox Tab is added to Visual Studio 2005:

With it you can drag a line, and oval shape, or a rectangle
shape onto the design surface of a Windows form.

Select a shape and use the 'Properties' pane to manipulate the
shape.

The possibilities are nearly endless.

Mike McIntyre
http://www.getdotnetcode.com
|