
Originally Posted by
Hack
Try...
Thank you, it works as I meant it to.
I'm a bit surprised we have to resort to API functions to accomplish such a -apparently- simple task
Final code:
VB Code:
Private Sub PicCW_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
With picCW(Index)
If X < 0 Or X > .ScaleWidth Or Y <> 0 And Y <> .ScaleHeight - 1 Then
ReleaseCapture
'The mouse is no longer over the picture box
MousePointer = ccDefault
ElseIf GetCapture() <> .hwnd Then
SetCapture .hwnd
'The mouse is over the picture box
MousePointer = ccSizeNS
End If
End With
End Sub