Hi Stephen,
You would think that Microsoft would provide an easy way to draw lines and boxes but they don't. However, you get very granulary control over the drawing of these objects.
To draw a straight line, you use the DrawLine method of the Graphics class. There are four overloaded versions of DrawLine, but they all involve the same information: the coordinates where the line begins and ends, and the pen used to draw the line.
Dim g As Graphics
Dim p As Pen
g = CreateGraphics()
p = New Pen(Color.Red, 10)
g.DrawLine(p, 2, 2, 3, 3)
For a box you use the DrawRectagle method of the Graphics class
Dim g As Graphics
Dim p As Pen
g = CreateGraphics()
p = New Pen(Color.Red, 10)
g.DrawRectangle(p, 10, 10, 100, 100)
>I'm trying to find visual controls for simple boxes and lines. I assume the Windows Form engine must provide boxes and lines objects like in VFP.
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi