How to determine when InputPanel type changed

K

Kris

Hi, all.

I'm trying to determine when the InputPanel changes type (from Keyboard
to Transcriber for example). Does anyone know how I could do this?

I have a PocketPC application that uses the InputPanel.EnableChanged
event in order to resize the interface to accomodate the InputPanel.
However when the InputPanel changes to a type that is of different size
(the Transcriber uses much less real-estate than the others), the
EnabledChanged event does not fire and thus I don't know to resize the
interface.

Thanks,
Kris
 
D

Darren Shaffer

The EnabledChanged event should still fire even with the transcriber.
Let's say you have a datagrid on your form and need to adjust it's
size based on the SIP:

grid.Height = Math.Min(this.RectangleToClient( sip.VisibleDesktop ).Bottom,
this.Bottom - SystemInformation.MenuHeight) - grid.Top;

you can adapt this example for tabcontrols, panels, and other containers of
controls.
--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com
 
K

Kris

In article <#[email protected]>,
(e-mail address removed) says...

Hi, Darren.

Your right, the EnabledChanged event does still fire when the InputPanel
type is Transcriber. However this event does not fire when the
InputPanel is already displayed (Enabled) and the user changes the type
to something else.

So for example the user has the Keyboard displayed (i.e. Enabled) and
then changes the InputPanel type to Transcriber. Because the InputPanel
was already in the Enabled state the EnabledChanged event does not fire
(at least not in our application). However this of course causes us
problems because the Transcriber type InputPanel uses much less space
than the Keyboard type InputPanel, meaning that my forms and their
controls are not updated to accomodate this change.

What I'm hoping to find is someway to determine when the user changes
the InputPanel type.

Thanks for your response.

Kris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top