VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Draw circles with random colors using circle methods of vb graphics

by Abdus Salam Naeem (3 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 26th January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Draw circles with random colors using circle methods of vb graphics

API Declarations


'TO RUN THIS CODE IN UR APPLICATION SIMPLY PUT
'TWO command buttons named as btstart and command1 on
'the form Named form1


Rate Draw circles with random colors using circle methods of vb graphics



btStart.Enabled = False
For i = 1 To 20
drawcircle
Next i

End Sub

Private Sub Command1_Click()
End
End Sub

Private Sub drawcircle()
Dim radius, xpos, ypos, WWIDTH
WWIDTH = 1
xpos = ScaleWidth / 2
ypos = ScaleHeight / 2

For radius = 5 To xpos / 2 Step 10
DoEvents
DrawWidth = WWIDTH
Circle (xpos, ypos), radius, RGB(Rnd * 255, Rnd * 255, Rnd * 255)
WWIDTH = WWIDTH + 0.1
FillStyle = 7
Next radius

End Sub




Download this snippet    Add to My Saved Code

Draw circles with random colors using circle methods of vb graphics Comments

No comments have been posted about Draw circles with random colors using circle methods of vb graphics. Why not be the first to post a comment about Draw circles with random colors using circle methods of vb graphics.

Post your comment

Subject:
Message:
0/1000 characters