我不太懂你的意思,我理解出两个意思
一,
Option Explicit
Dim xx As Integer
Dim yy As Integer
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
xx = X
yy = Y
End SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Line (xx, yy)-(X, Y), , B
End Sub
二,
Option Explicit
Dim xx As Integer
Dim yy As Integer
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Line (xx, yy)-(X, Y), , B
End Sub
一,
Option Explicit
Dim xx As Integer
Dim yy As Integer
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
xx = X
yy = Y
End SubPrivate Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Line (xx, yy)-(X, Y), , B
End Sub
二,
Option Explicit
Dim xx As Integer
Dim yy As Integer
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Line (xx, yy)-(X, Y), , B
End Sub
关键是在mousedown事件中添加: form.drawMode=7'xor mode
在mouseup事件中添加: form.drawmode=13'copy-pen mode
其余自己慢慢调吧,呵呵~~~~~不难,多注意X,Y坐标