Hi,
You an enumerate the Controls collection to determine if an InputPanel is
available. But it would be known by whatever its name was:
Dim x As Integer
For x = 0 To Controls.Count - 1
MsgBox(Controls.Item(x).Name)
Next
Note that the native input panel component (software input panel or SIP) is
always available in your application even if you don't add an
Microsoft.WindowsCE.Forms.InputPanel. The user can simply click its icon on
the toolbar. Windows CE does this for you. Adding the InputPanel component
enables the developer to do resizing tasks as you described. Here is an
example of how you can use an event to programmatically actviate the SIP by
using the InputPanel component, and resize other controls on the form.
Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles TextBox1.GotFocus
' Display the SIP.
' Note that the EnabledChanged event occurs
' whenever the SIP is enabled or disabled.
InputPanel1.Enabled = True
End Sub
Private Sub InputPanel1_EnabledChanged(ByVal sender As Object, ByVal e
As System.EventArgs) Handles InputPanel1.EnabledChanged
If InputPanel1.Enabled = False Then
' The SIP is disabled, so the height of the tab control
' is set to its original height with a variable
(TabOriginalHeight),
' which is determined during initialization of the form.
TabControl1.Height = TabOriginalHeight
Else
' The SIP is enabled, so the height of the tab control
' is set to the height of the visible desktop area.
VisibleRect = InputPanel1.VisibleDesktop
TabControl1.Height = VisibleRect.Height
End If
End Sub
Thanks,
Bruce Hamilton
Programmer Writer
..NET Compact Framework
(e-mail address removed)
This code is provided "AS IS" with no warranties and confers no rights.