Detecting user input - Programmer

This is a discussion on Detecting user input - Programmer ; Hello again, anyone any idea how I would detect a keypress or mouse movement from my application, particularly when my application isn't in focus? Basically, I want my application to wake up when a user presence is detected. Thanks, Martin...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Detecting user input

  1. Detecting user input

    Hello again,

    anyone any idea how I would detect a keypress or mouse movement from my
    application, particularly when my application isn't in focus? Basically, I
    want my application to wake up when a user presence is detected.

    Thanks,

    Martin



  2. Re: Detecting user input

    On Sun, 25 Apr 2004 19:59:08 +0100, "Martin John Brindle"
    wrote:

    >Hello again,
    >
    >anyone any idea how I would detect a keypress or mouse movement from my
    >application, particularly when my application isn't in focus? Basically, I
    >want my application to wake up when a user presence is detected.


    If you application does not have focus, you cannot detect keyboard activity from
    your app, because, by defintion, there isn't any.

    You can detect mouse movement over your client by trapping OnMouseMove. The LB
    and RB functions will can be detected in the usual way since the give your
    client focus (provided the mouse is not locked by another app) before 'doze
    generates the appropriate messages.


    Quandon


  3. Re: Detecting user input

    Thanks, I've tried this, but it isn't very reliable in catching mouse
    movement, either over my dialog, or not. I need it to catch any movement so
    I can update a status. Am I missing something? It must be possible as MSN
    seems to be able to manage it

    Martin


    "Quandon" wrote in message
    news:408c2ed9.365435968@news.onetel.net.uk...
    > On Sun, 25 Apr 2004 19:59:08 +0100, "Martin John Brindle"
    > wrote:
    >
    > >Hello again,
    > >
    > >anyone any idea how I would detect a keypress or mouse movement from my
    > >application, particularly when my application isn't in focus? Basically,

    I
    > >want my application to wake up when a user presence is detected.

    >
    > If you application does not have focus, you cannot detect keyboard

    activity from
    > your app, because, by defintion, there isn't any.
    >
    > You can detect mouse movement over your client by trapping OnMouseMove.

    The LB
    > and RB functions will can be detected in the usual way since the give your
    > client focus (provided the mouse is not locked by another app) before

    'doze
    > generates the appropriate messages.
    >
    >
    > Quandon
    >




  4. Re: Detecting user input

    On Tue, 27 Apr 2004 16:39:57 +0100, "Martin John Brindle"
    wrote:

    >Thanks, I've tried this, but it isn't very reliable in catching mouse
    >movement, either over my dialog, or not. I need it to catch any movement so
    >I can update a status. Am I missing something? It must be possible as MSN
    >seems to be able to manage it


    If you capture mouse input, you should get all mouse messages until you release
    it.

    Otherwise, it should be reliable whilst over your dialog, and you should get
    nothing otherwise.

    Quandon


+ Reply to Thread