The proper way to terminate the vb6 program is to do something like this:
Dim frm As Form For Each frm In Forms Unload frm Next frm end
What cares about forms, what cares about modules in memory?
There is no need to explicitly unload modules in VB6. They are automatically unloaded when the last form is unloaded. The language does not support references to standard modules in general, but only to (global) functions and variables defined in it. Since you cannot reference a module, you cannot unload them either.
Do not use End, you do not need (never). Then all memory is freed properly.
End
End, . , , . , , Nothing (, , ). , ( , !).
Nothing
"" .BAS( : Forms, Classes, UserControls ..), "" , .
. Forms , Form (, - ).
, , , . , CleanUp . - ORDER , , . , .
VB6 END. , , , , . COM- , .
End QuickBASIC Visual BASIC. , VB 4.X . 5.X.
VB 3.X , .
ALL MODULES API ExitProcess()
Source: https://habr.com/ru/post/1750542/More articles:Comparison of scalability between different DBMS - databaseJFileChooser returns wrong path in OS X (folder-only mode) - javaThe names of the days or the first 3 characters - pythonDoes the API call ExitProcess () in VB6 in order if you follow MS warnings? - vb6WCF: Comparison between not closing ChannelFactory and constantly re-creating ChannelFactory and closing it - .netProblem with violent ctags in Mac OS X - cMalloc for a CGPoint pointer throwing EXC_BAD_ACCESS on access - cэлемент массива доступа по значению - phpjquery ui - making dialogs more "dynamic"? - javascriptWin Inaccuracy Mobile6 GPS - c #All Articles