Hi Alan,
You can either:
1) Include menu.def at the top of your code and use: Run Menu Command M_FILE_CLOSE_ALL
2) Loop through all open tables and close them:
Dim i as Integer
For i = NumTables() to 1 Step -1
Close Table TableInfo(i,TAB_INFO_NAME)
Next
Regards
Tom Bacon
GIS Engineer, Mouchel
T 01444 472380 │ E thomas...@mouchel.com │ W www.mouchel.com
Our values: innovation │ excellence │ integrity │ responsibility
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups
"MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mouchel Limited (Mouchel) is registered in England and Wales with registered number 01686040 at Export House, Cawsey Way, Woking, Surrey, UK, GU21 6QX. The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. Any views or opinions expressed in this e-mail may be solely those of the author and are not necessarily those of Mouchel. No contracts may be concluded on behalf of Mouchel by means of email communications. Mouchel reserves the right to monitor and intercept emails sent and received on our network. |
Sorry, just realised you meant windows, not tables. I think your method of looping through the windows using NumWindows() to get the count is the only way, there is no menu shortcut.
Tom Bacon
GIS Engineer, Mouchel
T 01444 472380 │ E thomas...@mouchel.com │ W www.mouchel.com
Our values: innovation │ excellence │ integrity │ responsibility
Alan, you need to work backwards from the last to the first:
For i = NumWindows() to 1 Step -1
|
Error! Filename not specified. |
|
Mouchel Limited (Mouchel) is registered in England and Wales with registered number 01686040 at Export House, Cawsey Way, Woking, Surrey, UK, GU21 6QX. The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. Any views or opinions expressed in this e-mail may be solely those of the author and are not necessarily those of Mouchel. No contracts may be concluded on behalf of Mouchel by means of email communications. Mouchel reserves the right to monitor and intercept emails sent and received on our network. |
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups
"MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
To expand on that, if you do it incrementally in the ‘forward’ direction then each time you close a table the window indices shift to fill the gap. So if you close the window at index 1 then index 2 shifts down to fill index 1, index 3 moves to 2, etc… So to avoid this, you start at the top and that way the indices never shift. Hope that makes sense.
for x=1 to NumWindows()
close window windowinfo(x, WIN_INFO_WINDOWID)
next