TextInputPanel.SetInPlaceHoverTargetPosition Method
Explicitly positions the Tablet PC Input Panel hover target in screen coordinates.
Namespace: Microsoft.Ink.TextInput
Assembly: Microsoft.Ink (in Microsoft.Ink.dll)
Syntax
'Declaration
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
<UIPermissionAttribute(SecurityAction.Demand, Window := UIPermissionWindow.SafeTopLevelWindows)> _
<SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted := True)> _
Public Sub SetInPlaceHoverTargetPosition ( _
x As Integer, _
y As Integer _
)
'Usage
Dim instance As TextInputPanel
Dim x As Integer
Dim y As Integer
instance.SetInPlaceHoverTargetPosition(x, _
y)
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
[UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
public void SetInPlaceHoverTargetPosition(
int x,
int y
)
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
[UIPermissionAttribute(SecurityAction::Demand, Window = UIPermissionWindow::SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction::Demand, Unrestricted = true)]
public:
void SetInPlaceHoverTargetPosition(
int x,
int y
)
public function SetInPlaceHoverTargetPosition(
x : int,
y : int
)
Parameters
- x
Type: System.Int32
- y
Type: System.Int32
Remarks
There are no restrictions on where the hover target can be placed. The application is responsible for making sure the hover target stays on screen.
This method is synchronous. Positioning occurs before the method returns.
Examples
The following example demonstrates the use of SetInPlaceHoverTargetPosition. The tip object is an instance of TextInputPanel. In this example xInPlaceHoverPositionTextBox.Text and yInPlaceHoverPositionTextBox.Text are TextBox.Text properties that contain the values used in setting the x and y screen coordinates for positioning the Tablet PC Input Panel hover target. An editable field where the focus is placed is represented by the TextBox control, textBox1.
textBox1.Focus()
Dim xPosition As Integer = Convert.ToInt32(xInPlaceHoverPositionTextBox.Text, 10)
Dim yPosition As Integer = Convert.ToInt32(yInPlaceHoverPositionTextBox.Text, 10)
tip.SetInPlaceHoverTargetPosition(xPosition, yPosition)
textBox1.Focus();
int xPosition = Convert.ToInt32(xInPlaceHoverPositionTextBox.Text, 10);
int yPosition = Convert.ToInt32(yInPlaceHoverPositionTextBox.Text, 10);
tip.SetInPlaceHoverTargetPosition(xPosition, yPosition);
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0