- Home
·
- Graphics
·
- Draw shapes and fill them with random colours.
Draw shapes and fill them with random colours.
Draw shapes and fill them with random colours.
API Declarations
(put this in a module on one line)
Declare Sub FloodFill Lib "GDI32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal crColor As Long)
Rate Draw shapes and fill them with random colours.
(1(1 Vote))
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
CurrentX = X
CurrentY = Y
If Button = vbRightButton Then
ScaleMode = vbPixels
ForeColor = vbBlack
FillStyle = vbFSSolid
FillColor = RGB(Rnd * 256, Rnd * 256, Rnd * 256)
FloodFill hDC, X, Y, ForeColor
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
DrawWidth = 1
Line -(X, Y)
End If
End Sub
Draw shapes and fill them with random colours. Comments
No comments yet — be the first to post one!
Post a Comment