Share via


IUIAutomationTransformPattern::Move 方法 (uiautomationclient.h)

移動 使用者介面自動化 專案。

語法

HRESULT Move(
  [in] double x,
  [in] double y
);

參數

[in] x

類型: double

控制項左側的絕對螢幕座標。

[in] y

類型: double

控制項上方的絕對螢幕座標。

傳回值

類型: HRESULT

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

備註

項目無法移動、重設大小或旋轉,使其產生的螢幕位置完全超出容器的座標,而且無法存取鍵盤或滑鼠。 例如,當最上層視窗完全從螢幕外移動,或子物件移到容器檢視區界限之外時,物件會盡可能接近要求的螢幕座標,並覆寫為容器界限內的上方或左座標。

規格需求

需求
最低支援的用戶端 Windows 7、Windows Vista sp2 和 Platform Update for Windows Vista、Windows XP with SP3 和 Platform Update for Windows Vista [僅限桌面應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008、Windows Server 2003 SP2 和 Platform Update for Windows Server 2008 [僅限桌面應用程式]
目標平台 Windows
標頭 uiautomationclient.h (包含 UIAutomation.h)

另請參閱

CachedCanMove

CurrentCanMove

IUIAutomationTransformPattern