Yes, in fact, I'll give you an working example that you can use.
Also, if you want to learn, reserch ClipCursor.Code:Public Declare Function KeepKursor Lib "user32" _ Alias "ClipCursor" (lpRect As Any) As Long Public Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Sub CursorR(PictureB As PictureBox) Dim rrt As Rect rrt.Left = PictureB.Left rrt.Top = PictureB.Top rrt.Right = PictureB.Left + Picture1.Width rrt.Bottom = PictureB.Top + Picture1.Height KeepKursor(rrt) End Sub




Reply With Quote