Hi,
hier geb ich euch mal einen Code, womit ihr eure Form bewegen könnt:
(Viele nehmen MausPosition aber ich hab MausLocation genommen!)
Also bei mir geht alles einwandfrei... Bei Fehlern bitte im Thema posten.
Greets :
PhThMaster99
hier geb ich euch mal einen Code, womit ihr eure Form bewegen könnt:
(Viele nehmen MausPosition aber ich hab MausLocation genommen!)
VB.NET-Quellcode
- Public Class Form1
- Private MausLocation As Point
- Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
- If e.Button = Windows.Forms.MouseButtons.Left Then
- MausLocation = e.Location
- End If
- End Sub
- Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
- If e.Button = Windows.Forms.MouseButtons.Left Then
- Me.Location = e.Location - MausLocation + Me.Location
- End If
- End Sub
- End Class
Also bei mir geht alles einwandfrei... Bei Fehlern bitte im Thema posten.
Greets :
PhThMaster99