I try to close all my open App Windows, one should remain open (WndCustomers):
dim n, i As Integer
n = WindowCount
System.DebugLog(WindowCount.ToText)
for i = 0 to n - 1
if Window(i) isa WndActivitiesMonitor then WndActivitiesMonitor.Close
if Window(i) isa WndContacts then WndContacts.Close
if Window(i) isa WndNotes then WndNotes.Close
if Window(i) isa WndEmails then WndEmails.Close
if Window(i) isa WndActivities then WndActivities.Close
if Window(i) isa WndLocations then WndLocations.Close
next
But not all Windows get closed. Only 3 of them get closed. Is this the right method to close windows when you do not know which is open?