|
-
Aug 18th, 2005, 12:27 PM
#7
Re: Enumerating Windows
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|