Compartilhar via


IVMVirtualMachine::Mouse property

The Mouse property contains the mouse device for the virtual machine.

This property is read-only.

Syntax

HRESULT get_Mouse(
  [out] IVMMouse **mouse
);

VB
VMVirtualMachine.Mouse( _
  ByRef mouse _
)

Property value

The VMMouse object associated with this virtual machine.

This property value is read-only.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The mouse parameter is NULL.
VM_E_VM_UNKNOWN
The configuration is unknown.
VM_E_VM_NOT_RUNNING
The virtual machine must be running.
DISP_E_EXCEPTION
An unexpected error has occurred.

Examples

The following example accesses the VMMouse object of a VMVirtualMachine object and sends a left click to the VM.

Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("Windows Server 2003")
Set objMouse = objVM.Mouse

Wscript.Echo "VM Name: " & objVM.Name
Wscript.Echo "  Clicking left mouse button"
objMouse.Click(1)

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

IVMVirtualMachine