Results 1 to 3 of 3

Thread: Mousemove anywhwere on screen (not just over form)?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    20

    Mousemove anywhwere on screen (not just over form)?

    I would like to have a mousemove event that works no matter where the mouse is. I also need an event for any kind of keypress. basically I want the same sort of trigger that deactivates a screensaver, but a screensaver wont be on and the mouse may not be over the form. (keypress also needs to work when form does not have focus, is not active, whatever)

    Does this neccesarily require API calls? Because

    <understatement>

    I am somewhat of a novice with API

    </understatemnt>

    If anyone could help I would really apprieciate it.

    ____________________
    DoubleDown

    " ... so I ask him how old 'brother' is. And he says to me, ... this f***ing guy, he says 'Eleven' " - "And you said DoubleDown"

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    I think the TrackMouseEvent API should help you...
    VB Code:
    1. Declare Function TrackMouseEvent Lib "user32" (lpEventTrack As TRACKMOUSEEVENTTYPE) As Long
    2.  
    3. Public Type TRACKMOUSEEVENTTYPE
    4.     cbSize As Long
    5.     dwFlags As Long
    6.     hwndTrack As Long
    7.     dwHoverTime As Long
    8. End Type
    · lpEventTrack
    [in/out] Pointer to a TRACKMOUSEEVENT structure that contains tracking information.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    20

    I guess I need more help

    Do you make a call to that function in a timer? I couldn't seem to get your code to work.

    Thanks

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