VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is a simple code that makes dots all over a form

by Anomynous (1 Submission)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 16th October 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is a simple code that makes dots all over a form

Rate This is a simple code that makes dots all over a form



Const Black = &H0&
Form1.Caption = "Cool Color"
Timer1.Interval = 1
Form1.BackColor = Black
Form1.Tag = 0
Form1.WindowState = 2
Form1.Left = 0
Form1.Top = 0
End Sub
Private Sub Timer1_Timer()
Dim Red As Integer
Dim Blue As Integer
Dim Green As Integer
Dim X As Integer
Dim Y As Integer
For I = 1 To 5000
Red = Int(Rnd * 255)
Blue = Int(Rnd * 255)
Green = Int(Rnd * 255)
Y = Int(Rnd * Form1.Height)
X = Int(Rnd * Form1.Width)
PSet (X, Y), RGB(Red, Green, Blue)
Next I
Form1.Tag = Form1.Tag + 1
If Form1.Tag = 10 Then
Form1.Cls
Form1.Tag = 0
End If
End Sub


Download this snippet    Add to My Saved Code

This is a simple code that makes dots all over a form Comments

No comments have been posted about This is a simple code that makes dots all over a form. Why not be the first to post a comment about This is a simple code that makes dots all over a form.

Post your comment

Subject:
Message:
0/1000 characters