app.autoquit not quitting application

I have a Mac desktop app that I am porting to Windows. I have put app.Autoquit = True in the app.open event, however, the application is not quitting when the last window is closed.

Any ideas?

Make sure there are no hidden windows… In your app.close event put a simple check in if there are windows still open (this includes windows that are hidden)…

MsgBox str(WindowCount())

I think there may be a few other instances that keep your application running, if you do a search for “autoquit” on here, you can find some past threads where others had a similar issue and perhaps what they did to fix it…

OK. Thanks. I did try the MsgBox in the app.close event and it was not triggered on the last window closing.

Is there another way to search for hidden windows?

You can also verify if autoquit works. Put this in the close event :

if WindowCount() = 0 then quit

and see what happens

[quote=82967:@David Schlam]OK. Thanks. I did try the MsgBox in the app.close event and it was not triggered on the last window closing.

Is there another way to search for hidden windows?[/quote]
Put it in the window close event, not app.close.

Thanks. Found it. The little devil was hiding (of course).