CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2012
    Posts
    16

    How to Fix Dotted Lines

    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?

    Code:
    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

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How to Fix Dotted Lines

    Change the SCALE of frmDraw() to smaller coordinates, or use a lower resolution. You don't show any settings
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured