Creating A Program To Press A Keyboard Key And Create A Delay

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • asdasd

    Creating A Program To Press A Keyboard Key And Create A Delay

    Hello there,

    I'm hoping someone might be able to help me out. Its been awhile since I've
    programmed in visual basic (and roughly at that)... I want to create a
    program that will allow me to choose a keyboard key (perferably an F-KEY)
    from a combobox and be able to set a delay (in secs) from a textbox. Once
    that has been chosen I need to have a command box start the program until i
    press the command box again to stop it. Its sounds easy to me, but for some
    reason I have no idea how to make the VB program press a keyboard key for me
    and have it press the same key, lets say, every 10 seconds. I'm hoping to
    have this program run over another application. If anyone has any ideas how
    to go about this, i would be grateful. Thanks!


  • HKSHK

    #2
    Re: Creating A Program To Press A Keyboard Key And Create A Delay

    Helle asddas,

    You would use a Timer control and the SendKeys command.

    Regards,

    HKSHK

    Comment

    Working...