- Jun 16, 2004
- 1,034
- 0
- 0
I'm continuing to write a proof-of-concept program for grad school. This program needs to be able to graphically display data that comes from an array of data (the data will be color coded, so the smallest decile will be colored blue, the highest red and the rest in-between).
In Visual Basic (express edition), I've been able to write the following general code (assuming that the shape is a square). Granted the variables used in defining the rectangles could use some work; however, is the general approach right? Or is there a nicer (and faster) way to draw squares in visual basic?
Dim formGraphics As System.Drawing.Graphics
formGraphics = Me.CreateGraphics
For x = 0 To intNumberOfTiles
For y = 0 To intNumberOfTiles
formGraphics.FillRectangle(myBrush, New Rectangle(x * intMultiplier, y * intMultiplier, intWidth, intWidth))
Next
Next
THANKS!
In Visual Basic (express edition), I've been able to write the following general code (assuming that the shape is a square). Granted the variables used in defining the rectangles could use some work; however, is the general approach right? Or is there a nicer (and faster) way to draw squares in visual basic?
Dim formGraphics As System.Drawing.Graphics
formGraphics = Me.CreateGraphics
For x = 0 To intNumberOfTiles
For y = 0 To intNumberOfTiles
formGraphics.FillRectangle(myBrush, New Rectangle(x * intMultiplier, y * intMultiplier, intWidth, intWidth))
Next
Next
THANKS!