作业帮 > 综合 > 作业

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

来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/12 15:00:25
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 Su