Edit

Share via


IVMMouse interface

[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]

Controls the mouse device within a virtual machine (VM). The IVMMouse for a virtual machine can be retrieved using the IVMVirtualMachine::Mouse property. Coordinates for the mouse device can be represented either in absolute coordinates or in delta coordinates. Use the UsingAbsoluteCoordinates property to distinguish between the two methods of coordinate representation. Note that retrieving the current cursor position and the use of absolute coordinates are only supported if the guest operating system has the integration components installed.

Members

The IVMMouse interface inherits from the IDispatch interface. IVMMouse also has these types of members:

Methods

The IVMMouse interface has these methods.

Method Description
Click Simulates a mouse button click.
GetButton Retrieves the current state (up or down) of the specified mouse button.
SetButton Sets the current state (up or down) of the specified mouse button.

Properties

The IVMMouse interface has these properties.

Property Access type Description
HorizontalPosition
Read/write
The absolute x-coordinate of the mouse.
ScrollWheelPosition
Write-only
The z-coordinate of the mouse (relative only).
UsingAbsoluteCoordinates
Read/write
Indicates whether mouse coordinates represent absolute or relative coordinates.
VerticalPosition
Read/write
The absolute y-coordinate of the mouse.

Requirements

Requirement Value
Minimum supported client
Windows 7 [desktop apps only]
Minimum supported server
None supported
End of client support
Windows 7
Product
Windows Virtual PC
Header
VPCCOMInterfaces.h
IID
IID_IVMmouse is defined as ac903f6d-6346-4f29-8875-5d511a13895e