Solved

Program doesn't end

Posted on 2000-04-06
4
136 Views
Last Modified: 2010-05-02
When developing a recent project, I noticed that when I close the application, the VB IDE still shows that the program is running. Is this a bug in VB6, or is my application still running even after I close it?
0
Comment
Question by:gferrell
  • 2
4 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2690517
how are you closing it? how many forms do you have open at the time you are closing?  are there hidden forms etc...
0
 
LVL 32

Accepted Solution

by:
Erick37 earned 100 total points
ID: 2690594
Make sure you have unloaded all forms that the main form has loaded.  You can do this in the main form's Unload event:

Private Sub Form_Unload(Cancel As Integer)
    Dim frm As Form
    For Each frm In Forms
        If Not frm Is Me Then
            Unload frm
            Set frm = Nothing
        End If
    Next
End Sub

Also make sure to set all objects you created to nothing.
0
 
LVL 1

Expert Comment

by:prakashbitra
ID: 2690676
Use End to close your application.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 2690685
prak I would recommend posting comments at this site, the person asking the question can accept any comment as an answer later
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question