Function 獲取當前頁碼()
Dim hwnd As Long
Dim hwnd1 As Long
Dim hwnd2 As Long
Dim hwnd3 As Long
hwnd = FindWindow("AcrobatSDIWindow", "無廢話XML.pdf - Adobe Acrobat Pro")
If hwnd > 0 Then
hwnd1 = FindWindowEx(hwnd, 0, "AVL_AVView", "AVToolBarHostView")
If hwnd1 > 0 Then
hwnd2 = FindWindowEx(hwnd1, 0, "AVL_AVView", "AVToolBarView")
If hwnd2 > 0 Then
hwnd3 = FindWindowEx(hwnd2, 0, "Edit", "61.4%")
If hwnd3 > 0 Then
Else
MsgBox "hwnd3=0"
End If
Else
MsgBox "hwnd2=0"
End If
Else
MsgBox "hwnd1=0"
End If
Else
MsgBox "hwnd=0"
End If
End Function
不知道為什么hwnd3獲取結果為0,其它句柄正常,61.4%這個值是正確的,是從spy++中復制過來的
uj5u.com熱心網友回復:
你用enumwindows把hwnd 下所有的視窗都列出來看看......轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/103771.html
標籤:VB基礎類
上一篇:變數在賦值前被使用
下一篇:【原創】自己封裝的資料庫訪問類
