>Hello!
> I have a client that works on point of sale terminals and networks, and he is complaining that he often finds himself without a keyboard, and hence the ability to modify files or workgroup names etc. because the terminals (running in Windows) use a touch screens.
>What he has requested is a program that would respresent a keyboard on the screen so that he could peck away at various things. The problem I have is I don't know how to send strings to active programs. Such as notepad and neighborhood networking properties.
>Any suggestions?
If you can find the Window handle that the application is running in (using the Win32 API call FindWindow is one method; there's sample code for this in the FAQ or File Section of UT under the
Win32 and Other API category), there are a couple of API calls (SendMessage() and keybd_event() as applicable; they're similar but not identical in function; keybd_event can send the equivalent of a keystroke using a virtual key code, while SendMessage() can direct a variety of Windows messages to WinApps, not limited to simple keystrokes, and can handle some non-character keystrokes, like pressing an Alt key, and mouse events, which may be needed to navigate in a window.)
Because this is going to involve a fair amount of API programming, I'd suggest a different language than VFP for the application; while VFP can access the Win32 API, it's easier in a language like C, and VB has some built-in facilities for sending keystrokes to other Windows.