IVMMouse::HorizontalPosition property

The HorizontalPosition property contains the absolute x-coordinate of the mouse.

This property is read/write.

Syntax

HRESULT put_HorizontalPosition(
  [in]  long position
);

HRESULT get_HorizontalPosition(
  [out] long *position
);

VB
VMMouse.HorizontalPosition( _
  ByRef position, _
  ByVal position _
)

Property value

The x-coordinate indicating the new position of the mouse. When using absolute coordinates, this value specifies the new x-coordinate of the mouse. When using relative coordinates, this value specifies the number of pixels the mouse should be moved in the x direction.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The parameter is NULL.
VM_E_ADDITIONS_FEATURE_NOT_AVAIL
Additions must be installed to retrieve the mouse position, or to set the mouse position when using absolute coordinates.
VM_E_USING_RELATIVE_COORDINATES
The mouse device is currently set to use relative mouse coordinates.
VM_E_MOUSE_NOT_ACTIVE
The absolute coordinates cannot be retrieved if the mouse device is not powered up, or if it is not currently active in the virtual machine.
DISP_E_EXCEPTION
An unexpected error occurred.

Remarks

This property cannot be retrieved when using relative coordinates.

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMMouse