Home > Software engineering >  A vb code, beginners. Thanks
A vb code, beginners. Thanks

Time:11-14

Two vertical line and the mouse moved along with the intersection of two vertical line, two vertical line with mobile, but two lines always remain vertical

CodePudding user response:

Put a picture on the interface box named picture1, then paste the following code
 
Private Sub Picture1_MouseMove (Button As an Integer, Shift the As an Integer, As Single X, Y As Single)
Picture1. Cls
Picture1. Line (X - 100, Y) - (+ 100 X, Y), vbRed
Picture1. Line (X, Y - 100) - (X, Y + 100), vbBlue
End Sub

CodePudding user response:

You say this, is called the cross cursor, or rubber band technology, the good, the key word to you, Google yourself
  • Related