Application QUIT but hidden windows not quit

[b]I have a problem when closing my application,
I am running Windows 7 Pro, I compile the application, when I use the program and I quit the current application, I noticed that in the task manager, the program is still there (in the process) .
My program consists of a windows1 (main) and a windosw2 (secondary)
When my program is launched and I only work with windows1, no problem, when I leave the application everything normally close
In the task manager.

while using the programm program when i open windows2 (modal) (called from windows1), and ) after i close windows2 it seems that when I quit the program, the Windows task manager tells me That there is still a program in use.
The windows2 seems closed in my program, but I believe that it is hidden but not “deleted” windows.

In the “open event” appauto quit is true … and I tried in the “close event” code below without success:

Thanks a lot for your help

[/b]Dim k As Integer
Dim w As Window
For k = (WindowCount - 1) DownTo 0
W = Window (k)
If Not (w Is Self) Then w.Close

I will bet you have “implicit instance” set on all windows and somewhere you are referring to “something” on that window, which causes it to be active again. Perhaps something in THAT windows close event (which ever is staying active)

Thanks Dave,
i will check that, and i will give you my result

[b]I think i have found my problem , but i dont know how resolve it …its a database file problem

in windows1(main) in have to connect to a database , and use several instructions, in the same windows1 i have a button to call
windows2(secondary) that we uses recordset from database opened from windows1
it seems that when i close windows2 , the database file seems alive ) and i dont know why

If in windows1 i quit my application, i think my database (“opened” by recordset on windows2) must be close too
thks fr your help[/b]

When you say “Quit”, do you mean closing Window1 or using the Quit command?

I close windows1 by a button ( close action) , and the “Quit” action is get on
the close event App

Very strange. If you’re getting the app.close event, your app should be closed. I can’t think of anything that would leave the process running in task manager.

yes my app is closed , but the windows task manager see that my programm still in use … (only if i have opened my windows2 in my program) …when i see the problem , i try to delete the database file from the computer, but i cant , i had the message (this action is not possible because one file is opened in other programm…") . so i have to “delete” my program opened in the task manager ,and after i have the possibility to delete the database file.
the other “problem” that i used a very old version before Xojo its "realbasic " 2008, , perhaps this version of RB is not very “sure” for Windows 7 pro , anyway i think its ll better to upgrade to xojo . and see if the problem appears.
Thks for your help Tim

if something in the close even refers in any way to a property on a window with implicit instance, that window may become active (but not visible). I had this happen many times in the past, and finally got into the habit of engineering things differently.

Thanks Dave
Actually i haven 't found the solution about my problem , i dont understand how a database file (recordset close in the windows2)
must be still "opened " after my programm Quit

That’s a red herring. The database file is still open precisely because your program has not quit. It’s still running, probably due to what Dave said. Try commenting out all the code in your Close events and see if it still happens.

If you explicitly use the command Quit


In your code, the only thing that can prevent it from closing is if you return true somewhere in a window CancelLoad event.

That’s what I thought. Dave suggests otherwise.

Ok thks for yours answers Tim and Michel,and Dave , i’will see that,
i live in France, si its 11.00 am
I’ m off secerals days , i will give you news, as soon as possibld

Bonnes vacances :slight_smile:

The only other reason I could imagine is a tight loop having frozen execution that also prevents shut down.

Merci Michel Les vacances sont dans 1 semaine ,mais je reprends le travail que mardi pour 4 jours:-)je pense que j’aurais encore besoin de votre aide et de plus si vous etes Francais
Cella va m’arranger par rapport a mon pauvre anglais de base…
Bonne journe a vous