CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2008
    Posts
    45

    Talking Getting Keypress on timer

    Hiya,
    Just wondered, does anyone know how to get the ascii of a key press on a timer.
    thanks in advance

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: Getting Keypress on timer

    Ascii of a keypress can be retrieved using a KeyPress event handler, not in the timer.

    Do you want to get ascii of keys pressed even when your application is not in focus?

  3. #3
    Join Date
    Jul 2008
    Posts
    45

    Re: Getting Keypress on timer

    Yes, basically i have made this program ages ago which simply allows me to look at a drop down list and select a program i want to open. Unfortunately constant changing of programs means its quicker to go to the start menu. Therefore i tried to think of a better way and i wanted to know if there was a way so that when i do a certain key combination, my form which is minimized will be able to open the program i want. For example when i press ctrl + F then Flash CS4 will open etc.
    Thanks in advance

  4. #4
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: Getting Keypress on timer

    Have you looked at a much simpler way of creating shortcuts in Windows and assigning a specific shortcut key to these?

  5. #5
    Join Date
    Jul 2008
    Posts
    45

    Re: Getting Keypress on timer

    Yes and there are ways but i like to try and make programs myself which can do random things just for good practice. for example i did a silly program which turned pictures into text, there was no need for it i just like to learn how.
    Thanks

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Getting Keypress on timer

    Post the code. It could help someone else!
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jul 2008
    Posts
    45

    Re: Getting Keypress on timer

    For which program would you like the code??

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

Featured