Skip to Content
Windows Forms Programming in Visual Basic .NET
book

Windows Forms Programming in Visual Basic .NET

by Chris Sells, Justin Gehtland
October 2003
Intermediate to advanced
736 pages
15h 25m
English
Addison-Wesley Professional
Content preview from Windows Forms Programming in Visual Basic .NET

Brushes

The System.Drawing.Brush class serves as a base class for several kinds of brushes, depending on your needs. Figure 4.3 shows the five derived brush classes provided in the System.Drawing and System.Drawing.Drawing2D namespaces.

Figure 4.3. Sample Brushes

Figure 4.3 was created with the following code:

 Sub BrushesForm_Paint(sender As Object, e As PaintEventArgs) Dim g As Graphics = e.Graphics Dim x As Integer = 0 Dim y As Integer = 0 Dim width As Integer = Me.ClientRectangle.Width Dim height As Integer = Me.ClientRectangle.Height / 5 Dim whiteBrush As Brush = System.Drawing.Brushes.White Dim blackBrush as Brush = System.Drawing.Brushes.Black ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Visual Basic .NET

Learning Visual Basic .NET

Jesse Liberty
Windows Forms 2.0 Programming

Windows Forms 2.0 Programming

Chris Sells, Michael Weinhardt

Publisher Resources

ISBN: 0321125193Purchase book