Compartir a través de


HorizontalOffset Property

HorizontalOffset Property

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

Declaration

[C++]

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

[Microsoft® Visual Basic® 6.0]

Public Property Get HorizontalOffset() as Integer
Public Property Let HorizontalOffset ( _
    theHorizontalOffset as Integer)

Property Value

long The offset between the left edge of the pen input panel and the left 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 0.25 inches in pixels, dependent on screen resolution settings. A negative value indicates a shift to the left of the control. A positive value indicates a shift to the right. A zero value indicates that the left edge of the pen input panel is positioned exactly at the left edge of the control.

If the new position 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 horizontal position of the pen input panel 100 pixels to the right of the attached edit control by setting the HorizontalOffset 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 horizontal position of the pen input panel
thePenInputPanel.HorizontalOffset = 100

Applies To