James A. Gayhart


Hi,

My application uses an external authentication engine. The user has to enter codes into two text boxes.

This method works for all of our other applications. However, my particular application is done on a touch screen (no keyboard). I built an on-screen keyboard that pop-ups when users click (touch) a text box. I would like the same keyboard to pop-up when the user uses the authentication engine.

I figured out how to get the authorization window's handle as well as the handles to the two text boxes. In addition, I have figured out how to send text to these text boxes.

My question is, how do I trap when a user clicks the text box




Re: Trapping Mouse Clicks

rkimble


Sorry, but why reinvent the wheel Windows includes an onscreen keyboard...

I'm no API guru, but can't you subscribe to the click event through the API, similar to how you hooked the window and textboxes






Re: Trapping Mouse Clicks

James A. Gayhart

Hi,

Because I *like* to reinvent the wheel.

Seriously, I originally looked at Window's On-Screen Keyboard (OSK). The OSK works okay if you are using the mouse. It does not work so well if you are using your finger. The buttons are too small to be accurately and reliably pressed. In addition, because this application controls a machine, the application must be full-screen. With OSK, the user would be able to press the Win key or Alt-Tab to another window. Lastly, the OSK does not have the same look can feel as the rest of the application.

I was thinking that I could subscribe to the click event, but I don't know how.

FWIW, I did not hook the window or the text boxes. I used the API to find their handles, and used SendMessage to the text boxes to insert new text.







Re: Trapping Mouse Clicks

rkimble

I asked "why"! Guess that's an answer.

Sorry, I dont' know how to subscribe to the event either.

Just FYI, I also have a custom hardware device based on XP Embed that runs a custom app and uses a touchscreen. I allow use of the windows OSK and prevent running other applications using Group Policy. I haven't had complaints of mispressed keys, but screen resolution and touch screen sensitivity may account for that.

Since your problem isn't really VB related, you may need to try asking in a Windows API specific forum...

Oh, unless the other app that processes your login is also a .NET application - if it is, you may be able to use Reflection to communicate with it instead of the API...