I just created a 128 barcode control using the System.Drawing.Drawing2D namespace and was surprised out how easy it was. This coming from a graphically challenged programmer.
There are methods that allow you to create multiple rectangles and other shapes and draw them all at the same time.
For example, try the following code: Private Sub Form2_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint Dim g As Graphics = e.Graphics Dim oRects(2) As RectangleF Dim oBlackBrush As New SolidBrush(Color.Black) oRects(0) = New RectangleF(0, 0, 10, 100) oRects(1) = New RectangleF(20, 0, 10, 100) oRects(2) = New RectangleF(40, 0, 10, 100) g.FillRectangles(oBlackBrush, oRects) End SubFor me, this is exciting. My graphical skill isn't a heck of a lot more advanced than that but I can come up with some more examples if you like. On the other hand, maybe someone that posts in the <i>Game Development</i> or <i>Graphics and GDI+ in Windows Forms</i> would have some more advanced ideas.
Good luck!
|