'********************************** '** Function Declarations:#If Win32 Then Private Declare Function FindWindowEx& Lib "user32" Alias "FindWindowExA" (ByVal hWndParent As Long, ByVal hWndChildAfter As Long, ByVal lpClassName As String, ByVal lpWindowName As String) #End If 'WIN32Private Sub Form_DblClick() Dim hWnd As Long hWnd = FindWindowEx(0, 0, "Progman", "Program Manager") hWnd = FindWindowEx(hWnd, 0, "SHELLDLL_DefView", vbNullString) hWnd = FindWindowEx(hWnd, 0, "SysListView32", vbNullString) Debug.Print Hex$(hWnd) End Sub
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Dim tWnd As Long, bWnd As Long, cWnd As LongPrivate Sub Form_Load() tWnd = FindWindow("Progman", vbNullString) bWnd = FindWindowEx(tWnd, ByVal 0&, "SHELLDLL_DefView", vbNullString) cWnd = FindWindowEx(bWnd, ByVal 0&, "SysListView32", vbNullString) Me.Caption = cWnd End Sub
自己人也要给分,大不了8折
|
------SHELLDLL_DefView
|
------SysListView32
'** Function Declarations:#If Win32 Then
Private Declare Function FindWindowEx& Lib "user32" Alias "FindWindowExA" (ByVal hWndParent As Long, ByVal hWndChildAfter As Long, ByVal lpClassName As String, ByVal lpWindowName As String)
#End If 'WIN32Private Sub Form_DblClick()
Dim hWnd As Long
hWnd = FindWindowEx(0, 0, "Progman", "Program Manager")
hWnd = FindWindowEx(hWnd, 0, "SHELLDLL_DefView", vbNullString)
hWnd = FindWindowEx(hWnd, 0, "SysListView32", vbNullString)
Debug.Print Hex$(hWnd)
End Sub
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Dim tWnd As Long, bWnd As Long, cWnd As LongPrivate Sub Form_Load()
tWnd = FindWindow("Progman", vbNullString)
bWnd = FindWindowEx(tWnd, ByVal 0&, "SHELLDLL_DefView", vbNullString)
cWnd = FindWindowEx(bWnd, ByVal 0&, "SysListView32", vbNullString)
Me.Caption = cWnd
End Sub