No entiendo q hago mal, le di un monton de vueltas pero no me sale, si quiero saber el titulo de la ventana me funciona, asi:
pero cuando quiero saber la carpeta me sale vacio, el codigo me quedo asi:
pero no funciona , si alquien me puede dar una manito
Código [Seleccionar]
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Const WM_GETTEXT = &HD
Private Sub Command1_Click()
Dim i As Long
Dim s As String
s = String$(100, " ")
i = FindWindow("cabinetwclass", vbNullString)
Call SendMessageByString(i, WM_GETTEXT, Len(s), s)
Text1.Text = s
End Sub
pero cuando quiero saber la carpeta me sale vacio, el codigo me quedo asi:
Código [Seleccionar]
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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 SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Const WM_GETTEXT = &HD
Private Sub Command1_Click()
Dim i As Long
Dim s As String
s = String$(100, " ")
i = FindWindow("cabinetwclass", vbNullString)
i = FindWindowEx(i, ByVal 0&, "WorkerW", vbNullString)
i = FindWindowEx(i, ByVal 0&, "Rebarwin32", vbNullString)
i = FindWindowEx(i, ByVal 0&, "ComboBoxEx32", vbNullString)
i = FindWindowEx(i, ByVal 0&, "combobox", vbNullString)
i = FindWindowEx(i, ByVal 0&, "edit", vbNullString)
Call SendMessageByString(i, WM_GETTEXT, Len(s), s)
Text1.Text = s
End Sub
pero no funciona , si alquien me puede dar una manito