SetInPlaceVisibility Method

ITextInputPanel::SetInPlaceVisibility method

[ITextInputPanel is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use IInputPanelConfiguration. ]

Shows or hides the Tablet PC Input Panel.


HRESULT SetInPlaceVisibility(
   bool Visible



TRUE to show the Input Panel; FALSE to hide the Input Panel.

Return value

If the Input Panel can display, the method returns S_OK, otherwise E_FAIL. See the Remarks section for more information about when the Input Panel can and cannot be affected by the ITextInputPanel::SetInPlaceVisibility Method.

Return codeDescription



An unspecified error occurred.



The Input Panel is shown as specified by the ITextInputPanel::CurrentInPlaceState Property property.

Calling ITextInputPanel::SetInPlaceVisibility Method with the Visible parameter set to TRUE will fail if the Input Panel is already visible.

If the user has disabled in-place mode from the Input Panel options dialog, calling ITextInputPanel::SetInPlaceVisibility Method will fail.

Any ink already in the Input Panel, when visibility changes, is automatically inserted.

This method does not change the value of ITextInputPanel::InPlaceVisibleOnFocus Property, and on the subsequent focus change, the behavior reverts to the behavior specified by the ITextInputPanel::InPlaceVisibleOnFocus Property.

The ITextInputPanel::SetInPlaceVisibility Method is a synchronous call. The Input Panel visibility will change before the call returns.


This C++ example implements an EN_SETFOCUS event handler for an Edit control, IDC_EDIT1. It first checks to if an ITextInputPanel object, g_pTip, has been created. If it exists, it prevents the Input Panel from showing by calling the ITextInputPanel::SetInPlaceVisibility Method with a value of false for the Visible parameter.

void CCOMTIPDlg::OnEnSetfocusEdit1()
	if (NULL != g_pTip)
		if (SUCCEEDED(g_pTip->SetInPlaceVisibility(false)))
			TRACE("Successfully hid the Input Panel.\n");


Minimum supported client

Windows XP Tablet PC Edition [desktop apps only]

Minimum supported server

None supported

End of client support

Windows 7

End of server support

None supported


Peninputpanel.h (also requires Peninputpanel_i.c)



See also

ITextInputPanel Interface
InPlaceState Enumeration
ITextInputPanel::SetInPlaceHoverTargetPosition Method
ITextInputPanel::SetInPlacePosition Method
ITextInputPanel::DefaultInPlaceState Property



Community Additions

© 2016 Microsoft