Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On-screen keyboard 1

Status
Not open for further replies.

MangroBongacello

Programmer
Mar 20, 2001
189
SI
Hi,

I would like to create an on-screen keyboard for use on a touch-screen. I think I will make a dll with a form, that will have the keys (all the letters + some special keys). Now, the problem I have is how to send the keystrokes to a specific window. I guess there is an API function, that will return some id of the 2nd top window (considering that the top window will be the keyboard), to which the keystrokes will be sent (or more precisely to the text box on that window). But then again, how to use that id??

Can someone put me in the right direction? If someone has a totally diferent solution to the problem, no problem. Any idea will be great.

Many thanx, Mangro
 

Goto an arcade and take a look at the touch screen games and how they enter the names for the high score. They use a single form to accomplish what you are wanting to do. You could in theory do the same making it easier on yourself.

Good Luck
 
I do this exact same thing, except when I want input from the keyboard, I call a function. This code for this function displays the keyboard form, and waits in a loop until the entry is accepted (enter button on keyboard) or cancelled (ESC or Cancel button on keyboard). The text that is being entered is displayed in a text box on the keyboard form until this is performed. When the entry is accepted (or cancelled), the return value of the function is assigned, and passed back to the calling routine. Check for a blank ("") string or other indicator of your choice to see if the entry was accepted or cancelled.

I actually do this through a form and related code that I include in the desired project. I did however develop a numeric keypad as an ActiveX control that works the same way (just never took the time to make the keyboard into its own self contained control).

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top