- Home
·
- Graphics
·
- Program that makes circles randomly all over the form in many colors.
Program that makes circles randomly all over the form in many colors.
Program that makes circles randomly all over the form in many colors.
API Declarations
Dim Color As String
Dim Num As Variant
Dim Num2 As Integer
Dim i
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Rate Program that makes circles randomly all over the form in many colors.
(1(1 Vote))
Select Case Combo1.Text
Case Is = "Random"
Color = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
Case Is = "Blue"
Color = vbBlue
Case Is = "Green"
Color = vbGreen
Case Is = "Red"
Color = vbRed
Case Is = "White"
Color = vbWhite
Case Is = "Yellow"
Color = vbYellow
End Select
End Sub
Private Sub Command1_Click()
If Combo1.Text = "Random" Then
Color = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
ElseIf Combo1.Text = "MultiColor" Then
Num2 = Text2
Num = Num + Num2
Form1.Caption = Num & " Circles"
For i = 1 To Text2
FillColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
FillStyle = 0
Circle (Int(Rnd * 17970), Int(Rnd * 11985)), Int(Rnd * Text1)
Next i
GoTo Start
End If
Num2 = Text2
Num = Num + Num2
Form1.Caption = Num & " Circles"
For i = 1 To Text2
FillColor = Color
FillStyle = 0
Circle (Int(Rnd * 17970), Int(Rnd * 11985)), Int(Rnd * Text1)
Next i
Start:
End Sub
Private Sub Command2_Click()
Num = 0
Form1.Caption = Num & " Circles"
Form1.Cls
End Sub
Private Sub Form_Load()
Combo1.AddItem "MultiColor"
Combo1.AddItem "Random"
Combo1.AddItem "Red"
Combo1.AddItem "Blue"
Combo1.AddItem "Green"
Combo1.AddItem "White"
Combo1.AddItem "Yellow"
End Sub
Program that makes circles randomly all over the form in many colors. Comments
No comments yet — be the first to post one!
Post a Comment