locked
Gettin the movement of the mouse while minimized, and sending keys depending on the movement RRS feed

  • Question

  • Hello,
        I'm trying to create a program that when a person moves the mouse, no matter whether the form is minimized or not, it will look at the change in position, and send keys (primarily: up, down, left, and right) based on that.

    I thought of using a Low-Level Mouse Hook, but I don't know how to look at a change in its position, and send a key in response.

    If anyone can tell me how to fix this to do that, or alternatively, show me another way, it would be greatly appreciated.

    Thanks!
    chukrum47
    How are a plum and a rabbit similar? They're both purple, except for the rabbit.
    Tuesday, March 24, 2009 1:05 PM

Answers

  • Hi,

    The action would correspond to the definition of the "change in position".

    What is the interval of sending the keys? If the user keep moving the mouse to right for a long time and a long distance , how many "right" will be sent?

    If the user move from top-right to left-bottom , the left and down will be sent both?

    You might need to queue the postion of the mouse points every 0.1s, and manupulate them every 0.5s and send a key. 

    I think the application which hooking up the mouse movement won't performace well.



    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Harry Zhu Tuesday, March 31, 2009 1:52 AM
    Thursday, March 26, 2009 3:43 AM