virtual keyboard problem...urgent help required

Posted on 2005-05-15
Last Modified: 2013-11-15
Hi there,

here is the problem that i m currently facing...i need help immediately...

Project is "Virtual keyboard like on-screen keyboard provided by win xp"
The user can’t get more than the last key clicked into a some Text field like any combobox.
Some applications have Text Boxes that are coded to select all text in the control as soon as that control acquires focus.  This is supposed to allow the user to over-type the existing text without a “click and drag.”  If the user doesn’t want to over-type, he clicks in the field again.
• The user click a field in the target window, and it becomes the Foreground Window.
• The user clicks on a on-screen keyboard key.
• on-screen keyboard gets focus and becomes the Foreground Window.
• on-screen keyboard sets the previous window back as the Foreground Window.
• The now active window gives focus to the target Text Box Control.
• on-screen keyboard “sends” a key to the target field.
• The user clicks another on-screen keyboard key.
• on-screen keyboard again gets focus and becomes the Foreground Window.
• on-screen keyboard sets the previous window back as the Foreground Window.
• The now active window gives focus to the target Text Box Control, and pre-selects
  the character we just put in it.
• on-screen keyboard “sends” the new key to the target field that promptly overwrites
  the character we just put there.
• The end result is that the user can never type more than one character into the
  target field


Question by:RikiMegha
    LVL 48

    Accepted Solution

    Use WS_EX_NOACTIVATE extended window style for on-screen keyboard. This is the way XP on-screen keyboard working.
    LVL 1

    Expert Comment

    Maybe send 2 keys each time:
    send first the key 'end' so cursor goes to line end
    the send your character.

    hope it works.

    by the way, check out:
    there should probably be a similar program there.
    LVL 10

    Expert Comment

    by:Eduard Ghergu

    You can use the LostFocus event to store the text in a global string variable. At the begining, this variable is initialized with vbnullstring. On GotFocus event you have to set the text property with the value of global variable.

    The second scenario is to detect on form_load if the Keyboard application is running. You can set a flag to true in this case. On the GotFocus event, you have to check if the flag is true before entering into the selection code and to bypass it in this case.
    LVL 7

    Expert Comment

    I agree with AlexFM.  

    One may also want to set the keyboard to be the "Topmost" window.  

    Only other question would be what language are you using to write the virtual KB?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
    VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
    This tutorial will show how to inventory, catalog, and restore media from legacy versions of Backup Exec into both 2012 and 2014 versions of the software. Select Storage from the tabs along the ribbon bar as the top: Ensure the proper storage devi…
    This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now