Here's what I've boiled it down to:
Code:Public Class TestSig Dim MousePath As New Drawing2D.GraphicsPath() Dim xStart, yStart As Integer Dim CurrentPen As New Pen(Color.Black, 5.0!) Private Sub PictureBox1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove 'The below IfThen statement allows for the signee to start a new line If Math.Abs(xStart - e.X) < 30 AndAlso Math.Abs(yStart - e.Y) < 30 Then Me.MousePath.AddLine(xStart, yStart, e.X, e.Y) Else Me.MousePath.StartFigure() End If Me.PictureBox1.Invalidate() xStart = e.X yStart = e.Y End Sub Private Sub PictureBox1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint e.Graphics.DrawPath(Me.CurrentPen, Me.MousePath) End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click 'Clears the signature box Me.MousePath.Reset() Me.PictureBox1.Invalidate() End Sub Private Sub btnClose_Click(sender As System.Object, e As System.EventArgs) Handles btnClose.Click Me.Close() End Sub End Class




Reply With Quote