Private Sub PictureBox1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseUp Dim dpen As Pen = Pens.Red '←るきお追加 X2 = e.X Y2 = e.Y Dim g As Graphics = AutoGraphics(PictureBox1) g.DrawLine(dpen, X1, Y1, X2, Y2) PictureBox1.Invalidate() '←るきお追加 'End If '←るきおによるコメント化 End Sub