| | |
on-screen keyboard
Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jan 2006
Posts: 16
Reputation:
Solved Threads: 0
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
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
Check out the SendKeys function - it's part of the Win32 API.
Pascal and Delphi Syntax (Toggle Plain Text)
while(sleeping) cat_wails(); wake_up(); for(i=0;i<9;i++) shoot_cat(); rejoice(); goto(bed);
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.
Pascal and Delphi Syntax (Toggle Plain Text)
while(sleeping) cat_wails(); wake_up(); for(i=0;i<9;i++) shoot_cat(); rejoice(); goto(bed);
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.
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.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- Use the On-Screen Keyboard (Windows tips 'n' tweaks)
- Simulating on screen keyboard - Windows application in C# (C#)
- on screen keyboard (JSP)
- Keyboard error or no keyboard present (USB Devices and other Peripherals)
- Disables keyboard and locks up troubleshooting areas (Viruses, Spyware and other Nasties)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Coordinate problems with Windows.SetParent
- Next Thread: Page Margins when printing
| Thread Tools | Search this Thread |






