- Home
·
- Graphics
·
- This sample code draws a circle full of colours on the form and then saves it to a BMP file.
This sample code draws a circle full of colours on the form and then saves it to a BMP file.
This sample code draws a circle full of colours on the form and then saves it to a BMP file.
Rate This sample code draws a circle full of colours on the form and then saves it to a BMP file.
(1(1 Vote))
ScaleMode = vbPixels ' Set scale to pixels.
AutoRedraw = True ' Turn on AutoRedraw.
Width = Height ' Change width to match height.
CX = ScaleWidth / 2 ' Set X position.
CY = ScaleHeight / 2 ' Set Y position.
Limit = CX ' Limit size of circles.
For Radius = 0 To Limit ' Set radius.
Circle (CX, CY), Radius, RGB(Rnd * 255, Rnd * 255, Rnd * 255)
DoEvents ' Yield for other processing.
Next Radius
Msg = "Choose OK to save the graphics from this form "
Msg = Msg & "to a bitmap file."
MsgBox Msg
SavePicture Image, "TEST.BMP" ' Save picture to file.
This sample code draws a circle full of colours on the form and then saves it to a BMP file. Comments
No comments yet — be the first to post one!
Post a Comment