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


InkCollector.SetWindowInputRectangle - метод

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

Sets the window rectangle, in pixels, within which ink is drawn.

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

Синтаксис

'Декларация
Public Sub SetWindowInputRectangle ( _
    windowInputRectangle As Rectangle _
)
'Применение
Dim instance As InkCollector
Dim windowInputRectangle As Rectangle

instance.SetWindowInputRectangle(windowInputRectangle)
public void SetWindowInputRectangle(
    Rectangle windowInputRectangle
)
public:
void SetWindowInputRectangle(
    Rectangle windowInputRectangle
)
public void SetWindowInputRectangle(
    Rectangle windowInputRectangle
)
public function SetWindowInputRectangle(
    windowInputRectangle : Rectangle
)

Параметры

Заметки

By default, the window input rectangle is set to {0,0,0,0}. This default rectangle maps to the size of the entire window. To reset the window input rectangle to an empty rectangle with the default coordinates, pass {0,0,0,0} in the call to the SetWindowInputRectangle method.

You cannot pass in a rectangle where the value of the Right property is less than the value of the Left property; or where the value of the Bottom property is less than the value of the Top property. For example, a rectangle with parameters of {500, 500, 400, 400} is not valid.

A rectangle in negative coordinate space can be specified but is meaningless, because it always results in a window that cannot be inked upon.

Предупреждение

  If you set the window input rectangle to overlap a Splitter control or the borders of the window, unpredictable results may occur when the window is resized.

ms569257.alert_note(ru-ru,VS.90).gifПримечание.

This function can be re-entered if called within certain message handlers, causing unexpected results. Take care to avoid a reentrant call when handling any of the following messages: WM_ACTIVATE, WM_ACTIVATEAPP, WM_NCACTIVATE, WM_PAINT; WM_SYSCOMMAND if wParam is set to SC_HOTKEY or SC_TASKLIST; and WM_SYSKEYDOWN (when processing Alt-Tab or Alt-Esc key combinations). This is an issue with single-threaded apartment model applications.

Примеры

This C# example calls the SetWindowInputRectangle method to set the ink input area to the size of the entire window of the InkCollector object, theInkCollector, to which it is attached.

using Microsoft.Ink;
//...
InkCollector theInkCollector;
public Form1()
{
    // Initialization
    theInkCollector = new InkCollector(Handle);
    Rectangle theRect = new Rectangle(0,0,0,0);
    theInkCollector.SetWindowInputRectangle(theRect);
    //...
}

This Visual Basic .NET example calls the SetWindowInputRectangle method to set the ink input area to the size of the entire window of the InkCollector object, theInkCollector, to which it is attached.

Imports Microsoft.Ink
Dim theInkCollector As InkCollector
Public Sub Form1()
    'Initialization
    Dim theRect As Rectangle
    theInkCollector = New InkCollector(Handle)
    theRect = New Rectangle(0,0,0,0)
    theInkCollector.SetWindowInputRectangle(theRect)
    '...
End Sub

Платформы

Windows Vista

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

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

.NET Framework

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

См. также

Ссылки

InkCollector Класс

InkCollector - члены

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

InkCollector.GetWindowInputRectangle