Поделиться через


TextInputPanel.SetInPlaceHoverTargetPosition - метод

Обновлен: Ноябрь 2007

Explicitly positions the Tablet PC Input Panel hover target in screen coordinates.

Пространство имен:  Microsoft.Ink.TextInput
Сборка:  Microsoft.Ink (в Microsoft.Ink.dll)

Синтаксис

'Декларация
<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 _
)
'Применение
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
)
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
/** @attribute UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows) */
/** @attribute SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true) */
public void SetInPlaceHoverTargetPosition(
    int x,
    int y
)
public function SetInPlaceHoverTargetPosition(
    x : int, 
    y : int
)

Параметры

Заметки

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.

Примеры

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);

Платформы

Windows Vista, Windows XP с пакетом обновления 2 (SP2), Windows Server 2003

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

TextInputPanel Класс

TextInputPanel - члены

Microsoft.Ink.TextInput - пространство имен