次の方法で共有


DrawnBox Property

DrawnBox Property

Returns or sets the box that is physically drawn on the tablet's screen and in which writing takes place.

Declaration

[C++]

[propput] HRESULT put_DrawnBox ([in] InkRectangle* DrawnBox);
[propget] HRESULT get_DrawnBox ([out, retval] InkRectangle** DrawnBox);

[Microsoft® Visual Basic® 6.0]

Public Property Get DrawnBox() As InkRectangle
Public Property Let DrawnBox(ByVal theBox As InkRectangle)

Property Value

InkRectangle Returns or sets a rectangle that is relative to the top left of the writing box.

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The context is invalid or the parameter is an invalid pointer.
E_INK_EXCEPTION An exception occurred inside the method.

Remarks

The lines of the drawn box are visual cues that specify where writing can take place. The user normally writes within the boundaries of the lines.

Another box, the writing box, is the invisible box in which writing can actually take place. It is larger than the drawn box and provides a margin of error to users if they draw ink outside the lines of the drawn box. You can use the WritingBox property to set the writing box.

The writing box specifies the boundaries of the ink to the recognizer. The drawn box is drawn using ink space units, relative to the top left of the writing box.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example sets all of the values in the guide simultaneously.

Private Sub ResetGuideSettings( _
ByRef theRecognizerGuide As InkRecognizerGuide, _
ByVal columns As Integer, _
ByVal rows As Integer, _
ByVal midline As Integer, _
ByVal drawnBox As InkRectangle, _
ByVal writingBox As InkRectangle)
    theRecognizerGuide.columns = columns
    theRecognizerGuide.rows = rows
    theRecognizerGuide.midline = midline
    theRecognizerGuide.drawnBox = drawnBox
    theRecognizerGuide.writingBox = writingBox
End Sub

Applies To