# 为何不能画一条直线?

Posted by chris on October 31, 1998 at 12:18:23:

请问为何在PictureBox画不出一条直线,而是不断的画直线?

Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
sngoldX = X
sngoldY = Y
End If
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
Picture1.Line (sngoldX, sngoldY)-(CurrentX, CurrentY), RGB(255, 255, 255)
Picture1.Line (sngoldX, sngoldY)-(X, Y), RGB(0, 0, 0)
End If
End Sub
那有问题?

Follow Ups:

- Re: 为何不能画一条直线? Honey 23:14:58 11/05/98 (0)