EnumFormsOpen




Function ContaFin(value As Boolean) As Integer
g = GetDesktopWindow
k = GetWindow(g, GW_CHILD)
f1 = GetWindow(k, GW_FIRST)
f2 = GetWindow(k, GW_LAST)
k = f1
Do
If value Then DoEvents
i = i + 1
k = GetWindow(k, GW_NEXT)
' Dim o As RECT **QUI CI METTI IL CONTROLLO**

' t = GetWindowRect(k, o) **DELLE DIMENSIONI E DI ALTRO**

' ox = o.Right - o.Left

' oy = o.Top - o.Bottom

' If ox > 1 And oy > 1 Then MsgBox (k)

Loop Until k = f2
DoEvents
ContaFin = i
End Function

sfoglio tutte le applicazioni attive con GetWindow, poi
tengo solo quelle con dimensioni di finestre maggiori di
qualche pixel (io tengo solo quelle con dim maggiori di 1);
le dimensioni le ottieni con GetWindowRect
Con questa funzione conto tutte le finestre presenti, poi
puoi giocare sulle dimensioni o sulle caption delle finestre










( enumformsopen.html )- by Paolo Puglisi - Modifica del 17/12/2023