Option Explicit
 
Private Sub Command1_Click()
    End
End Sub
 
Private Sub Form_Load()
    Randomize (Timer)
    Timer1.Interval = 1
    Timer1.Enabled = True
End Sub
 
Private Sub Form_Resize()
    Command1.Top = Me.ScaleHeight - Command1.Height - 120
    Command1.Left = Me.ScaleWidth - Command1.Width - 120
End Sub
 
Private Sub Timer1_Timer()
    Dim CorX As Integer, CorY As Integer
    Dim VRojo As Integer, VVerde As Integer, VAzul As Integer
    'Obtenemos las coordenadas aleatorias de los puntos a dibujar.
    CorX = Int(Rnd * Me.ScaleWidth)
    CorY = Int(Rnd * Me.ScaleHeight)
    'Obtenemos valores aleatorios para dar color al punto a dibujar.
    VRojo = Int(Rnd * 255)
    VVerde = Int(Rnd * 255)
    VAzul = Int(Rnd * 255)
    'Dibujamos el punto en el lugar y con el color obtenido anteriormente.
    PSet (CorX, CorY), RGB(VRojo, VVerde, VAzul)
End Sub