Share via


VerticalOffset Property

VerticalOffset Property

Gets or sets the offset between the closest horizontal edge of the pen input panel and the closest horizontal edge of the control to which it is attached.

Declaration

[C++]

[propput] HRESULT VerticalOffset (
    [in] long VerticalOffset);
[propget] HRESULT VerticalOffset (
    [out, retval] long *VerticalOffset);

[Microsoft® Visual Basic® 6.0]

Public Property Get VerticalOffset() as Integer
Public Property Let VerticalOffset ( _
    theVerticalOffset as Integer)

Property Value

long The offset between the closest horizontal edge of the pen input panel and the closest horizontal edge of the control to which it is attached.

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_FAIL An unspecified error occurred.

Remarks

The default value is the equivalent of 1/16 inches in pixels, dependent on screen resolution settings. A value of 0 (zero) attaches the PenInputPanel object directly to the bottom of the control. A value of -1 places it 1 pixel above the control.

If the new position of the PenInputPanel causes the panel to appear outside the boundary of the screen working area, the panel is shifted toward the center of the working area so that the edges of the panel are adjacent to the nearest edges of the screen.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example creates a PenInputPanel object, thePenInputPanel, and attaches it to an InkEdit control, InkEdit1. It then sets the vertical position of the PenInputPanel object 100 pixels from the nearest horizontal edge of the attached edit control by setting the VerticalOffset property.

' Declare a new PenInputPanel object
Dim thePenInputPanel As PenInputPanel

' Create the PenInputPanel
Set thePenInputPanel = New PenInputPanel

' Attach the PenInputPanel to an InkEdit control
thePenInputPanel.AttachedEditWindow = InkEdit1.hWnd

' Set the vertical position of the PenInputPanel object
thePenInputPanel.VerticalOffset = 100

Applies To