Displays or hides the soft input panel (SIP) used on the Pocket PC.
SetSIPPreferredState ( hwnd, SIPState )
Argument |
Description |
---|---|
hwnd |
A long that is the handle of the window or control that receives the SIP input. |
SIPState |
A value of the SIPState enumerated datatype that specifies the display state of the SIP. Values are:
|
Integer. Returns 0 for success and a negative value for failure. When running on the desktop or in the development environment, SetSIPPreferredState always returns 0.
Use SetSIPPreferredState to display the input panel when the application requires user input and hide it otherwise.
Do not call SetSIPPreferredState in an application until a window is active. The Open event for a window occurs too early to call this system function. If you need to call this function for a window, you can post a user event from the Open event and make the call from the posted event:
this.event POST ue_post_open()
If you specify SipUp!, any pending SipDown requests are ignored. When you specify SipDown!, a timer is set and the input panel is hidden when the timer expires. This prevents the input panel from flashing if another control requests SipUp!.
If you want the input panel hidden immediately and you are sure there will be no SipUp! requests, specify SipForceDown!.
If you specify SipDown! and then specify SipUnchanged! before the timer expires, the input panel remains in its current state.
These statements in the GetFocus event of a SingleLineEdit control display the input panel when the control gets focus:
integer li_return
li_return = SetSIPPreferredState(Handle(This),SIPUp!)