vb画连续线line(x,y)-(a,b)如何把第一条线的终点a和b数据变成第二条线起点x和y数

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 17:23:07

vb画连续线line(x,y)-(a,b)如何把第一条线的终点a和b数据变成第二条线起点x和y数
vb画连续线line(x,y)-(a,b)如何把第一条线的终点a和b数据变成第二条线起点x和y数

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