codice:
Option Explicit
Private Type BlinkingPoint
x As Single
y As Single
blinkOn As Boolean
End Type
Private Points() As BlinkingPoint
Private Sub Form_Load()
Picture1.DrawWidth = 10
Picture1.ForeColor = vbRed
ReDim Points(0)
Timer1.Enabled = False
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim newPt As BlinkingPoint
newPt.x = x
newPt.y = y
newPt.blinkOn = True
Picture1.PSet (x, y), Picture1.ForeColor
If Timer1.Enabled Then
ReDim Preserve Points(UBound(Points) + 1)
End If
Points(UBound(Points)) = newPt
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Dim counter As Long
For counter = LBound(Points) To UBound(Points)
Picture1.PSet (Points(counter).x, Points(counter).y), IIf(Points(counter).blinkOn, Picture1.BackColor, Picture1.ForeColor)
Points(counter).blinkOn = Not Points(counter).blinkOn
Next
End Sub