- Home
·
- Graphics
·
- Draws a random coloured line when you move the mouse
Draws a random coloured line when you move the mouse
Draws a random coloured line when you move the mouse
Rate Draws a random coloured line when you move the mouse
(1(1 Vote))
'"Lines" By neggster
'Date: January 25 2002
'Requires: Nothing but the code!
Private Sub Form_Load()
Me.BorderStyle = 0 'set the form to have no border
Me.WindowState = 2 'maximize the window
Me.BackColor = black 'set the background colour to black
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Unload Me 'close the window when you click
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
X = X 'get the x coordinate
Y = Y 'get the y coordinate
r = Rnd * 255 'select a random red value
g = Rnd * 255 'select a random green value
b = Rnd * 255 'select a random blue value
Me.Line (X, Y)-Step(X, Y), RGB(r, g, b) 'draw the line
End Sub
Draws a random coloured line when you move the mouse Comments
No comments yet — be the first to post one!
Post a Comment