LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

On-screen Keyboard

Hi,

 

I’m in the process of developing an on-screen keyboard (due to the windows on-screen keyboard being too small), behaving exactly like a normal keyboard, for an application that will be installed on a touch-screen system.

 

I have a panel which has a String Control and the buttons that make up the keyboard.  On selection of a keyboard button I want to update the value within the String Control using the FakeKeystroke function.  The problem I have is that when I set the active control to be the String Control (in order to get the keystroke to fake in the String Control) the current value of the text control becomes highlighted therefore the next keystroke overwrites the previous.

 

Any help in getting this as close to standard keyboard functionality as possible would be greatly appreciated.

 

Thanks,

James.

0 Kudos
Message 1 of 2
(3,100 Views)
You could replace the string control with a textbox control, next simply SetCtrlVal the new character to the textbox: on a textbox SetCtrlVal appends to the existing content, while on a string control it replaces existing contents. This way you have no need to use SetActiveCtrl to use FakeKeystroke.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(3,087 Views)