Dim texten As String
Dim kalle As Long
'Dim handles(1000) As Long
Private Sub Command1_Click()
For kalle = 0 To 10000
leng = GetWindowTextLength(kalle)
If leng > 1 Then
texten = Space$(leng + 1)
a = GetWindowText(kalle, texten, leng)
List1.AddItem texten
'h = h + 1: handles(h) = kalle
End If
Next
End Sub