Private Sub Form1_LocationChanged(...) Handles MyBase.LocationChanged tmrMove.Enabled = True End Sub Private Sub tmrMove_Tick(...) Handles tmrMove.Tick If Me.Left < 0 Then Me.Left = 0 tmrMove.Enabled = False End If End Sub>I have a MDI Parent/Child situation and I am trying to prevent my child form from moving it's left position to a negative. Same goes for the top position. I have achieved this via the following code:
>Private Sub frm_A_Users_Move(ByVal sender As Object, _ > ByVal e As System.EventArgs) Handles MyBase.Move > > Dim intLeft As Integer = Me.Left > Dim intTop As Integer = Me.Top > > If intLeft < 0 Then Me.Left = 0 > If intTop < 0 Then Me.Top = 0 > >End Sub >>
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams