PrivateSub Timer1_Tick()Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim currpos As System.Drawing.Point currpos =Me.Cursor.Position Dim x AsInteger 'x = currpos.X - Me.Panel1.Left x = currpos.X -Me.Left If Math.Abs(x) <Me.Panel1.Left +20Then IfMe.Panel1.Width <220Then Me.Panel1.Width +=20 EndIf Else IfMe.Panel1.Width >15Then Me.Panel1.Width -=20 EndIf EndIf End Sub