Results 1 to 31 of 31

Thread: Mouse_no_longer_move

Threaded View

  1. #7

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: Mouse_no_longer_move

    Quote Originally Posted by Hack View Post
    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:
    1. Private Sub PicCW_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    2.     With picCW(Index)
    3.         If X < 0 Or X > .ScaleWidth Or Y <> 0 And Y <> .ScaleHeight - 1 Then
    4.                ReleaseCapture
    5.                'The mouse is no longer over the picture box
    6.                MousePointer = ccDefault
    7.         ElseIf GetCapture() <> .hwnd Then
    8.                SetCapture .hwnd
    9.                'The mouse is over the picture box
    10.                MousePointer = ccSizeNS
    11.         End If
    12.     End With
    13. End Sub
    Last edited by krtxmrtz; Mar 11th, 2010 at 05:42 AM.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width