다음을 통해 공유


PenInputPanel.MoveTo 메서드

업데이트: 2007년 11월

사용되지 않습니다. PenInputPanel 개체의 위치를 정의된 화면 위치로 설정합니다. PenInputPanel은 Microsoft.Ink.TextInput으로 대체되었습니다.

네임스페이스:  Microsoft.Ink
어셈블리:  Microsoft.Ink(Microsoft.Ink.dll)

구문

‘선언
<UIPermissionAttribute(SecurityAction.Demand, Window := UIPermissionWindow.SafeTopLevelWindows)> _
<SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted := True)> _
<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name := "FullTrust")> _
Public Sub MoveTo ( _
    left As Integer, _
    top As Integer _
)
‘사용 방법
Dim instance As PenInputPanel
Dim left As Integer
Dim top As Integer

instance.MoveTo(left, top)
[UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true)]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public void MoveTo(
    int left,
    int top
)
[UIPermissionAttribute(SecurityAction::Demand, Window = UIPermissionWindow::SafeTopLevelWindows)]
[SecurityPermissionAttribute(SecurityAction::Demand, Unrestricted = true)]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = L"FullTrust")]
public:
void MoveTo(
    int left, 
    int top
)
/** @attribute UIPermissionAttribute(SecurityAction.Demand, Window = UIPermissionWindow.SafeTopLevelWindows) */
/** @attribute SecurityPermissionAttribute(SecurityAction.Demand, Unrestricted = true) */
/** @attribute PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust") */
public void MoveTo(
    int left,
    int top
)
public function MoveTo(
    left : int, 
    top : int
)

매개 변수

설명

PenInputPanel 개체가 연결되어 있는 컨트롤에 포커스가 없는 경우 MoveTo 메서드를 사용하면 오류가 발생합니다. 연결된 컨트롤에 포커스가 있으면 펜 입력 패널이 표시되지 않은 경우 이 메서드를 호출해도 오류가 발생하지 않습니다.

새 위치로 변경했을 때 패널이 화면 작업 영역 경계를 벗어나 표시되는 경우에는 패널 가장자리가 화면에서 가장 가까운 가장자리에 인접하도록 패널이 작업 영역 중앙 쪽으로 이동됩니다.

PenInputPanel 개체의 자동 배치 동작을 명시적으로 재정의하려면 PenInputPanel 개체의 LeftTop 속성을 사용하여 개체의 현재 위치를 결정합니다. PenInputPanel이 사용자에게 표시되어야 하는 화면 섹션에 있는 경우 MoveTo 메서드를 사용하여 PenInputPanel을 다시 배치합니다.

PanelMoving 이벤트가 발생할 때 PenInputPanelMovingEventArgs 개체의 LeftTop 속성을 모니터링하여 PenInputPanel 개체의 자동 배치 동작을 재정의할 수도 있습니다. PenInputPanel이 사용자에게 표시되어야 하는 화면 섹션에 있는 경우 MoveTo 메서드를 사용하여 PenInputPanel을 다시 배치합니다.

ms569667.alert_security(ko-kr,VS.90).gif보안 정보:

부분 신뢰 환경에서 사용하는 경우 이 메서드에 SecurityPermissionFlag.AllFlags 권한 및 PenInputPanel에서 요구하는 권한이 필요합니다. 자세한 내용은 Security and Trust를 참조하십시오.

예제

이 C# 예제에서는 PenInputPanel 개체인 thePenInputPanel을 InkEdit 컨트롤인 theInkEdit에 연결합니다. 그런 다음 VisibleChanged 이벤트 처리기인 VisibleChanged_Event를 PenInputPanel의 폼에 추가합니다. 이벤트 처리기에서 PenInputPanel 개체가 표시된 경우 MoveTo 메서드를 호출하여 해당 위치를 화면 좌표 (100, 100)으로 변경합니다.

[C#]

//...

// Delcare the PenInputPanel object
PenInputPanel thePenInputPanel;

public Form1()
{
    // Required for Windows Form Designer support
    InitializeComponent();

    // Create and attach the new PenInputPanel to an InkEdit control.
    thePenInputPanel = new PenInputPanel(theInkEdit);

    // Add a PenInputPanelVisibleChanged event handler
    thePenInputPanel.VisibleChanged +=
        new PenInputPanelVisibleChangedEventHandler(VisibleChanged_Event);
}

//...

public void VisibleChanged_Event(object sender,
PenInputPanelVisibleChangedEventArgs e)
{
    // Make sure the object that generated
    // the event is a PenInputPanel object
    if (sender is PenInputPanel)
    {
        PenInputPanel theSenderPanel = (PenInputPanel)sender;

        // If the panel has become visible...
        if (e.NewVisibility)
        {
            // Move the pen input panel to
            // screen position (100, 100)
            theSenderPanel.MoveTo(100, 100);
        }
    }
}

이 Microsoft® Visual Basic® .NET 예제에서는 PenInputPanel 개체인 thePenInputPanel을 InkEdit 컨트롤인 theInkEdit에 연결합니다. 그런 다음 VisibleChanged 이벤트 처리기인 VisibleChanged_Event를 PenInputPanel의 폼에 추가합니다. 이벤트 처리기에서 PenInputPanel 개체가 표시된 경우 MoveTo 메서드를 호출하여 해당 위치를 화면 좌표 (100, 100)으로 변경합니다.

[Visual Basic]

'...

' Declare the PenInputPanel object
Dim thePenInputPanel As PenInputPanel

Public Sub New()
    MyBase.New()

    'This call is required by the Windows Form Designer.
    InitializeComponent()

    ' Create and attach the new PenInputPanel to an InkEdit control.
    thePenInputPanel = New PenInputPanel(theInkEdit)

    ' Add a PenInputPanelVisibleChanged event handler
    AddHandler thePenInputPanel.VisibleChanged, _
               AddressOf VisibleChanged_Event
End Sub 'New

'...

Public Sub VisibleChanged_Event(sender As Object, e As _
                                PenInputPanelVisibleChangedEventArgs)
    ' Make sure the object that generated
    ' the event is a PenInputPanel object
    If TypeOf sender Is PenInputPanel Then
       Dim theSenderPanel As PenInputPanel = CType(sender, PenInputPanel)

       ' If the panel has become visible...
       If e.NewVisibility Then
          ' Move the pen input panel to
          ' screen position 100, 100
            theSenderPanel.MoveTo(100, 100)
       End If
    End If
End Sub 'VisibleChanged_Event

플랫폼

Windows Vista

.NET Framework 및 .NET Compact Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

3.0에서 지원

참고 항목

참조

PenInputPanel 클래스

PenInputPanel 멤버

Microsoft.Ink 네임스페이스