J'essayé ton code, ca me fais pareil.
Voici ce que j'ai trouvé qui marche (faut le convertir pour que ca fasse la même chose)
Private Declare Function RecupLaFenetre Lib "user32" Alias "GetWindow" _
(ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function RecupLePidDuPapa Lib "user32" Alias "GetParent" _
(ByVal hwnd As Long) As Long
Private Declare Function RecupLaLongueurDeLeTexte Lib "user32" Alias _
"GetWindowTextLengthA" (ByVal hwnd As Long) As Long
Private Declare Function RecupLeTexte Lib "user32" Alias "GetWindowTextA" _
(ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function ModifLeTexte Lib "user32" Alias "SetWindowTextA" _
(ByVal hwnd As Long, ByVal lpString As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessageA Lib "user32" (ByVal hwnd As Integer, _
ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
Sub LoadTaskList()
Dim CurrWnd As Long
Dim LongueurDeLeNom As Long
Dim TaskName As String
Dim Parent As Long
CurrWnd = RecupLaFenetre(frm_principale.hwnd, 0)
gIndex = 0
While CurrWnd <> 0
Parent = RecupLePidDuPapa(CurrWnd)
LongueurDeLeNom = RecupLaLongueurDeLeTexte(CurrWnd)
TaskName = Space$(LongueurDeLeNom + 1)
Length = RecupLeTexte(CurrWnd, TaskName, LongueurDeLeNom + 1)
TaskName = Left$(TaskName, Len(TaskName) - 1)
If Length > 0 And gIndex < 200 Then
'If TaskName <> Me.Caption Then
frm_principale.List1.AddItem TaskName
gIndex = gIndex + 1
End If
CurrWnd = RecupLaFenetre(CurrWnd, 2)
DoEvents
Wend
End Sub