Hi,
I'm looking for the piece of code that handles the dragging/moving of windows from the mouse.
I want to limit the form to be bounded within an area.
I have written the code below but want to prevent the form going out of bounds to trigger this event.
Private Sub Form2_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Move
Form1.Label1.Text = "Form screen position = " + Me.Location.ToString()
If Me.Location.X < 0 Then
Me.Left = 0
End If
End Sub
Thanks
I'm looking for the piece of code that handles the dragging/moving of windows from the mouse.
I want to limit the form to be bounded within an area.
I have written the code below but want to prevent the form going out of bounds to trigger this event.
Private Sub Form2_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Move
Form1.Label1.Text = "Form screen position = " + Me.Location.ToString()
If Me.Location.X < 0 Then
Me.Left = 0
End If
End Sub
Thanks