VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A variation of the Code submitted by me earlier. This one produces patterns randomly.

by S.K.Dogra (4 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 12th March 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A variation of the Code submitted by me earlier. This one produces patterns randomly.

Rate A variation of the Code submitted by me earlier. This one produces patterns randomly.



Dim Cntr As Integer

Private Sub Timer1_Timer()
x1 = Rnd * 10000
y1 = Rnd * 10000
Refresh
For Cntr = 1 To 1000 Step 3
x2 = x1 + Rnd * 1000
y2 = y1 + Rnd * 1000
Line (x1, y1)-(x2, y2)
Next Cntr
ForeColor = RGB(Rnd * 256, Rnd * 256, rnd256)
For Cntr = 1 To 1000 Step 3
x2 = x1 - Rnd * 1000
y2 = y1 - Rnd * 1000
Line (x1, y1)-(x2, y2)

Next Cntr
ForeColor = RGB(Rnd * 256, Rnd * 256, rnd256)
For Cntr = 1 To 1000 Step 3
x2 = x1 - Rnd * 1000
y2 = y1 + Rnd * 1000
Line (x1, y1)-(x2, y2)

Next Cntr
ForeColor = RGB(Rnd * 256, Rnd * 256, rnd256)
For Cntr = 1 To 1000 Step 3
x2 = x1 + Rnd * 1000
y2 = y1 - Rnd * 1000
Line (x1, y1)-(x2, y2)

Next Cntr
ForeColor = RGB(Rnd * 256, Rnd * 256, rnd256)
End Sub

Private Sub Form_load()
Timer1.Interval = 1000
End Sub



Download this snippet    Add to My Saved Code

A variation of the Code submitted by me earlier. This one produces patterns randomly. Comments

No comments have been posted about A variation of the Code submitted by me earlier. This one produces patterns randomly.. Why not be the first to post a comment about A variation of the Code submitted by me earlier. This one produces patterns randomly..

Post your comment

Subject:
Message:
0/1000 characters