Hi all.
I´m trying to solve a VB problem for some time, without seeing any light at the end of the tunnel.
I need to create a virtual keyboard, that works as an array of controls inside a Frame, which is able to programmatically send key strokes to editable controls like ComboBoxes, ListBoxes, etc.
The first ideia was to use an array of Command Buttons.
But, the problem is that normal Command Buttons, when clicked, will take the focus from the other control that had it before, and that I want to edit.
This means that every time I click on a virtual key, the place where I want text to appear loses focus.
I can save the values corresponding to the clicked virtual keys, and concatenate them to any previous values on the control being edited, and then programmatically set the focus back to the control being edited as well as the new value, but this causes some flickering on the edited control, every time a virtual key is pressed.
So, this is not the most elegant solution, when compared to the Win XP On-Screen Keyboard behaviour, for example.
Now, after trying many ways to solve this, my only hope relies on the hypothesis of writting an ActiveX control that could acomplish it´s function when clicked, but that stays neutral in what concerns to the focus situation.
I mean, a special button, that when clicked, programmaticaly sends keystrokes to the control being edited, but that does´nt steal this control´s focus on the process.
I have no prior experience in creating ActiveX controls, but I know that they allow great control over the events and methods, and this might be the solution for my problem.
But before I start to spend my time learning ActiveX programming, I would like to know if this can fullfill my needs.
If yes, can anyone give me some guide lines on how to solve my problem with ActiveX?
I´ll be extremely pleased with any help.

Thanks alot for your attention

Francisco Simoes