How To Activate the Soft Input Panel (SIP) from an eVB Application (265799)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0, when used with:
    • Microsoft Windows CE Platform SDK for Pocket PC

This article was previously published under Q265799

SUMMARY

This article illustrates how to call the SipShowIM function to activate the virtual keyboard on a Pocket PC device from an eMbedded Visual Basic (eVB) application.

MORE INFORMATION

Step-by-Step Example

  1. Start a new PocketPC Project in eMbedded Visual Basic. Form1 is created by default.
  2. Place two command buttons on Form1. Do not be concerned about the placement of the controls.
  3. Paste the following code into Form1:
    Option Explicit
    Declare Function SipShowIM Lib "coredll" (ByVal flags As Long) As Long
    
    Private Sub Form_Load()
        Command1.Move 240, 120, 3015, 495
        Command2.Move 240, 720, 3015, 495
        Command1.Caption = "Show Keyboard"
        Command2.Caption = "Hide Keyboard"
        Form1.Caption = "SipShowIM Sample"
    End Sub
    
    Private Function Showkeyboard() As Long
        Showkeyboard = SipShowIM(1)
    End Function
    
    Private Function Hidekeyboard() As Long
        Hidekeyboard = SipShowIM(0)
    End Function
    
    Private Sub Command1_Click()
        Showkeyboard
    End Sub
    
    Private Sub Command2_Click()
        Hidekeyboard
    End Sub
    
    Private Sub Form_OKClick()
        App.End
    End Sub
    					
  4. In the Project Properties dialog box, set the Run on Target option to Pocket PC (default device).
  5. Press the F5 key to run the project, and click the buttons to show and hide the virtual keyboard.
NOTE: This sample runs only on the device and not in the emulator.

REFERENCES

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

209014 How To Call Windows CE APIs from VBCE or eVB

265451 How To Run an eMbedded Visual Basic Application Full Screen on a Pocket PC Device

275182 PRB: FormResize Appears to Have No Effect When the SIP Is Shown

247963 How To Activate the PsPC Keyboard from a VBCE Application


Modification Type:MinorLast Reviewed:6/29/2004
Keywords:kbhowto KB265799