Welcome Guest!
Create Account | Login
Locator+ Code:

Search:
FTPOnline Channels Conferences Resources Hot Topics Partner Sites Magazines About FTP RSS 2.0 Feed

Click here to receive your FREE subscription to Visual Studio Magazine

email article
printer friendly
more resources

Maximize the Pocket PC Textbox
Pocket PCs use a special window to get text input from users. Here's how to maximize that space without covering up form elements.
by Bill Wagner

September 2003 Issue

Technology Toolbox: VB.NET, C#

My previous Pocket PC article (see Additional Resources) showed you how .NET Compact Framework development is similar to .NET development. In this article, I'm going to make some changes to that application to make it friendlier in the Pocket PC environment. The Pocket PC (in fact, most Windows CE devices) uses a special window called the Software Input Panel to get text input from the user. The user can show or hide this panel, and your application needs to respond by moving or resizing controls. You can show or hide the input panel programmatically.

ADVERTISEMENT

The System.WindowsCE.Forms.InputPanel class stores the functionality to work with the input panel. The input panel has a small interface, but it's an important one if you want your application to be easy to use. There are three common members of the InputPanel class that you'll use in almost all your applications. Before you can use the InputPanel, you need to create an InputPanel object in your application. To do this, simply add the code, or use the VS.NET designer. When you create a compact device project, the toolbox includes the InputPanel class, so you can drag that control onto your form.

Once you have added the InputPanel, you can start to manipulate it in your application. The Enabled property lets you show or hide the InputPanel programmatically. For the text notes sample application, the Text Panel should be enabled all the time; after all, it's only logical that users will want to type text in the text notes application. Add a handler for the Load on the form to enable the InputPanel programmatically:

private void OnLoad(object sender, 
   System.EventArgs e)
{
   TheInputPanel.Enabled = true;
}


Back to top













Java Pro | Visual Studio Magazine | Windows Server System Magazine
.NET Magazine | Enterprise Architect | XML & Web Services Magazine
VSLive! | Thunder Lizard Events | Discussions | Newsletters | FTPOnline Home