vb画连续线line(x,y)-(a,b)如何把第一条线的终点a和b数据变成第二条线起点x和y数
展开全部
line 起点不要设置就可以了
参考代码:
Dim mouseD As Boolean
Private Sub Form_Load()
Form1.AutoRedraw = True
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.Line (X, Y)-(X, Y)
mouseD = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If mouseD Then
Form1.Line -(X, Y)
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mouseD = False
End Sub
参考代码:
Dim mouseD As Boolean
Private Sub Form_Load()
Form1.AutoRedraw = True
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.Line (X, Y)-(X, Y)
mouseD = True
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If mouseD Then
Form1.Line -(X, Y)
End If
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mouseD = False
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询