March 30, 2002

Dashed lines with custom caps

You can set properties of the Pen object to create custom lines. For example, you can use the DashStyle enumerated property to draw dashed lines using a predefined pattern, and you can even create custom dash patterns by assigning an array of Single values to the DashPattern property. The StartCap

Building arrays on the fly

VB.NET supports the creation of arrays on-the-fly, by using the New operator. For example, look at the following code, that uses GDI methods to display few connected lines ‘ Get the Graphics object from the form.Dim gr As Graphics = Me.CreateGraphics’ Draw three straight lines.Dim points() As Point = {New

Create a gradient background

a gradient brush is a brush that contains all the color nuances that vary from a starting color to an ending color, like the typical background screen of many installation procedures or Microsoft PowerPoint slides. The simplest way to create a linear gradient brush is passing its size (by means

Drawing B

GDI+ supports two different forms of a complex curve that can’t be represented as an arc of a circle or an ellipse: a cardinal spline and a B

Drawing Cardinal splines

GDI+ supports two different forms of a complex curve that can’t be represented as an arc of a circle or an ellipse: a cardinal spline and a B