使用DP获取对象Location

'Retrieve the Handle of the target WinEdit

iHWND = Window("").WinEdit("").GetROProperty("hwnd")

 

Set oDesc = Description.Create

oDesc("micclass").Value = "WinEdit"

Set oParent = Window("").ChildObjects(oDesc)

 

For i = 0 to oParent.Count - 1

  if Window("").WinEdit("location:="&i).GetROProperty("hwnd" = iHWND) then

   msgbox "Location Ordinal Identifier = "&i

   Exit For

  End if

Next

 

posted @ 2012-06-12 21:10  dushuai  阅读(145)  评论(0编辑  收藏  举报