Software keyboard

  • Thread starter Thread starter Javier Ros
  • Start date Start date
J

Javier Ros

Hi all!,

I need to build a form with some editBoxes and my own numeric keyboard,
I have a problem with the keyboard, I have used a Button object for each
number
(1, 2, 3, .. 9) but when I press the buttons the current textBox lost the
focus and
I can´t know as it is the textbox where send the key pressed.

Any Ideas?
 
Have a TextBox variable tracking which was the last box to receive focus:
e.g. mLastBox.
When your numeric buttons are clicked, append/manipulate text for the
mLastBox (optionally giving it back the focus depending on your specific
requirements)

Cheers
Daniel
 
hmn, yes, yes, isn´t the most elegant way, I don´t think that the SIP works
it.

other way?

--
Saludos,

---------------------------------------------------------
Javier Ros Moreno
Aguas de Murcia
Murcia (España)
---------------------------------------------------------

Daniel Moth said:
Have a TextBox variable tracking which was the last box to receive focus:
e.g. mLastBox.
When your numeric buttons are clicked, append/manipulate text for the
mLastBox (optionally giving it back the focus depending on your specific
requirements)

Cheers
Daniel
 
The SIP works by dropping characters into the input system using
PostKeybdMessage and keybd_event. Characters end up at whatever control
(even in another application), has the focus.

Paul T.

Javier Ros said:
hmn, yes, yes, isn´t the most elegant way, I don´t think that the SIP
works
it.

other way?
 
You're right, but then you're not writing a SIP. The SIP is designed
specifically for this and it's not a Window in your current application
process. If that's what you want, then you really need to write a SIP.

-Chris



Javier Ros said:
hmn, yes, yes, isn´t the most elegant way, I don´t think that the SIP works
it.

other way?
 
Back
Top