PDA

Click to See Complete Forum and Search --> : Touchscreen


Mad Compie
Sep 14th, 2000, 01:50 PM
Hi,

I'm writting a GUI for an embedded PC with a touchscreen. Since I need sometimes some user input, I decided to write a software keyboard program, since there's no external keyboard present.
Everything works with the standard VB routines as long as I stay in the same VB project.
But what if I want to use it also with other programs, like Windows itself?
Should I use GetAsyncKeyState()? That's all I found for now on.

Sep 14th, 2000, 02:23 PM
You mean detecting keypresses outside of your program? If so then yes, GetAsyncKeyState() will work.

gwdash
Sep 14th, 2000, 09:31 PM
If you want to create a virtual keyboard, take a look at SetKeyboardState(), it will allow you to set all the key states on the keyboard appriopriatly

See http://www.vbapi.com

Mad Compie
Sep 15th, 2000, 01:07 PM
No, SetKeyboardState() only allows us to manipulate the VK_... constants, like NumLock, F1, NUMPAD2, ..., not the ANSI charset.
GetAsyncKeyState() does the thing. I found some examples how to use it, but sometimes I received some weird chars, i.e. after opening Notepad and typing some chars, then returning to my program, I saw a large prefix string before my chars typed.