Results 1 to 4 of 4

Thread: Keypress event by API

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2005
    Posts
    7

    Question Keypress event by API

    Hi, I have two programs. One program sends some keypress event to the 2nd one by sendmessage API. I can do that perfectly but my problem is that the keypress event is triggered twice. 1st I have used sendmessage for keydown then immediately again used sendmessage for keyup in code. To solve my problem I have also tried SendMessageCallback, SendNotifyMessage in place of SendMessage. But nothing worked. Is there anyway to make the keypress event for once by any way.

    regardly
    Sangit

  2. #2
    Fanatic Member
    Join Date
    Aug 2005
    Location
    South Africa
    Posts
    760

    Re: Keypress event by API

    I'm not sure I understand what your problem is, but if I got it right then couldn't you just remove the KeyUp sendmessage?
    If I helped you out, please consider adding to my reputation!

    -- "The faulty interface lies between the chair and the keyboard" --

    VB6 Programs By Me:
    ** Dictionary, Thesaurus & Rhyme-Generator In One ** WMP Recent Files List Editor ** Pretty Impressive Clock ** Extract Firefox History **

  3. #3
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: Keypress event by API

    Have you tried PostMessage ?
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2005
    Posts
    7

    Re: Keypress event by API

    Hi shirazamod,

    I also know there is a keyboard for pressing keys. But you should have noticed many wireless devices(eg. remote control) can be used for that purpose also. I am working on a program like that which will hook to other program to control them. Any ways ... thanks for your reply.

    Hi iPrank
    Yes I have also tried postMessage and facing the same problem. The event is triggered twice. Say for example if I send "f" char to make a screen FULL/Small at small window ... it is making it full and then making it small. Any suggession will be highly appretiated.

    regardly
    Sangit
    Last edited by sangit; Apr 20th, 2006 at 01:44 PM.

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