CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012

    Exclamation Help me for sending keys to a program

    I have a dilemma,
    I am using vb6, through my application I want to send some keys mentioned below to a application:
    1. caption of application = "ODIN Client Ver10.0.0.2(Powered by FT-Engines)

    2. Every time I close the application and restart it the class is different mentioned below are the 2 class id i got

    Now this class is of the main form there are many MDICHild form as well , so which ever is active child i wish to send the keys
    1. shift + f12
    2. wait of around 3 seconds
    3. escape key
    4. Down arrow Key / Up arrow Key to move focus within the MDICHILD window at different records.

    Hope I am clear , I have tried many figureing out many options but honestly I am really weak when it comes to API's I also tried taking some tutorials, it did help but the purpose is not solved hope somebody helps me.
    thanks in advance

  2. #2
    Join Date
    May 2012
    Bonn, Germany

    Re: Help me for sending keys to a program

    You can simulate key presses and releases using the WinAPI function "keybd_event". More info about how to use it in VB here: http://www.andreavb.com/forum/viewtopic_1802.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)