943,712 Members | Top Members by Rank

Ad:
Jan 7th, 2006
0

on-screen keyboard

Expand Post »
Hey,

I'm trying to create a on-screen keyboard for a group of disabled students at a school. So far i've managed to create the program to type out each letter/number that the user clicks on. This is fine, but I have to state the name of the active window that the text/numbers get printed.

Would anyone know how I could send a keystroke from my program to a program like Microsoft Word, Internet Explorer, Microsoft Publisher etc?

I know Microsoft Windows XP has one built in, but the keys/letters are too small for the students to press because of there conditionss. So could someone please help me.

Katrix36
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Katrix36 is offline Offline
16 posts
since Jan 2006
Jan 7th, 2006
0

Re: on-screen keyboard

Check out the SendKeys function - it's part of the Win32 API.
Reputation Points: 12
Solved Threads: 6
Light Poster
Ooble is offline Offline
44 posts
since Oct 2005
Jan 8th, 2006
0

Re: on-screen keyboard

Thank you for the code, but I have already tryed that. I'm wanting to on-screen keyboard to send a keystroke to a non-active window, just like the one built into windows xp.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Katrix36 is offline Offline
16 posts
since Jan 2006
Jan 8th, 2006
0

Re: on-screen keyboard

The SendKeys function sounds to be what you want. You'll need to get the handle of the last window to be focused, and send the keys directly to it. Unfortunately, I haven't done any Win32 programming in a while, so I'm not quite sure how you would go about it... hopefully someone with more than half a brain will come along and pull me out of this hole.
Reputation Points: 12
Solved Threads: 6
Light Poster
Ooble is offline Offline
44 posts
since Oct 2005
Jan 9th, 2006
0

Re: on-screen keyboard

Only the window that has keyboard focus can receive keyboard events AFAIK.
You'll have to instead create some interface that will allow the virtual keyboard to send data to your application forms and fill them that way, working outside the Windows message dispatcher system.

Maybe it's changed though, I've not done any Win32 API programming in quite a while.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Jan 10th, 2006
0

Re: on-screen keyboard

Thank you for all your help
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Katrix36 is offline Offline
16 posts
since Jan 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Pascal and Delphi Forum Timeline: Coordinate problems with Windows.SetParent
Next Thread in Pascal and Delphi Forum Timeline: Page Margins when printing





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC