Share via


Height Property

Height Property

Gets or sets the height of the pen when drawing ink with the InkDrawingAttributes object.

Declaration

[C++]

[propput] HRESULT put_Height ([in] float Height);
[propget] HRESULT get_Height ([out, retval] float* Height);

[Microsoft® Visual Basic® 6.0]

Public Property Get Height() As Single
Public Property Let Height(ByVal theHeight As Single)

Property Value

float Gets or sets a single-precision number that indicates the height of the pen. The default pen height is 1 (in ink space units).

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER Parameter pointer was NULL or invalid.
E_INK_EXCEPTION An exception occurred inside the method.
E_INVALIDARG The height of the pen cannot be less than 0.

Remarks

This property applies only to the Rectangle pen tip. The value represents the height of the side of the rectangle. If using the Ball pen tip then the height of the pen tip is equal to the Width property, and the Height property is ignored.

Precision is limited to 1/1000 (three digits to the right of the decimal point). For example, if you specify a value of 2.0006, the most precise measurement is 2.001.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example shows menu handlers that change the Height property of an InkDrawingAttributes object.

   Dim theInkCollector As InkCollector
'...
    Private Sub MenuInkHeightShort_Click()
        'Set the pen about one pixel tall in HIMETRIC
        theInkCollector.DefaultDrawingAttributes.Height = 30
        Refresh
    End Sub
'...
    Private Sub MenuInkHeightTall_Click()
        'Set the pen about ten pixels tall in HIMETRIC
        theInkCollector.DefaultDrawingAttributes.Height = 300
        Refresh
    End Sub

Applies To