The number of times I crashed VB writing this...
At present, I haven't found a way of getting For Each to work, so to to loop through all windows you have to do this:
VB Code:
Dim objWindows As CWindows
Set objWindows = New CWindows
objWindows.GetWindows
Dim i As Long
For i = 1 To objWindows.Count
With objWindows(i)
' do something
End With
Next i
Set objWindows = Nothing
It has 2 classes, CWindows (collection class) and CWindow (wraps various window-related APIs) and a .bas module MCallbacks.
I'll update it with any feature requests, at the moment it just has the basics such as window caption, position, etc.