How to Fix Dotted Lines

k3nnt0ter0

Member
Joined
Aug 21, 2012
Messages
22
Programming Experience
Beginner
The smaller the font and the faster the speed I move the mouse, the greater the gap of the dots. Can it be connected as I drag the mouse?

VB.NET:
Public Class frmDraw    Dim down As Boolean = False
    Dim x As Integer = 3


    Private Sub pbDraw_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pbDraw.MouseDown
        down = True
    End Sub


    Private Sub pbDraw_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pbDraw.MouseMove
        If down = True Then
            pbDraw.CreateGraphics.FillEllipse(Brushes.Black, e.X, e.Y, x, x)
        End If
    End Sub


    Private Sub pbDraw_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles pbDraw.MouseUp
        down = False
    End Sub


    Private Sub srSize_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles srSize.ValueChanged
        x = srSize.Value
    End Sub
End Class
 
Back
Top