hi leute
wie kann man die form bewegen wenn
und
ich hab nen panel und mit dem will ich die form bewegen will
mein code
würde mich freuen auf hilfreiche antworten
wie kann man die form bewegen wenn
und
ich hab nen panel und mit dem will ich die form bewegen will
mein code
VB.NET-Quellcode
- Private Overloads Sub OnMouseDown(ByVal Sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
- MyClass.MouseButton = e.Button()
- With MyClass.CurrentPosition
- .X = e.X()
- .Y = e.Y()
- End With
- End Sub
- Private Overloads Sub OnMouseMove(ByVal Sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
- Select Case MouseButton
- Case Is = Windows.Forms.MouseButtons.Left
- MyClass.Top = Windows.Forms.Cursor.Position.Y() - MyClass.CurrentPosition.Y()
- MyClass.Left = Windows.Forms.Cursor.Position.X() - MyClass.CurrentPosition.X()
- Case Is = Nothing
- Exit Sub
- End Select
- End Sub
- Private Overloads Sub OnMouseUp(ByVal Sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseUp
- MyClass.MouseButton = Nothing
- End Sub
würde mich freuen auf hilfreiche antworten