Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 13th, 2005, 05:01 PM
Registered User
Join Date: Feb 2005
Location: Karachi, , Pakistan.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to PakXoxer Send a message via Yahoo to PakXoxer
Default Application still runing even after Ending it

i m facing a problem that even after i End the
application in Form_Unload event, the application
still running in the background. when i check the
task manager application name is shown there with
the status Not Responding.
please tell me how would i end every procedure running
in the application before quiting from the application.

Reply With Quote
  #2 (permalink)  
Old February 14th, 2005, 05:11 AM
Registered User
Join Date: Dec 2004
Location: Milano, , Italy.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Peppiniello

Hi, the problem may be represent by some form opened not in modal way (i.e. frmMain.Show and not frmMain.Show 1).
So, once unloaded and try to quit the program, that form is still active but hidden.
That's why you cannot "safely" end yuor program!
But this is NOT a bug !
There are many workaround, such as try to remember that forms and use the "Unload frmMain" command, or use the End command in the Unload event of the MAIN form of the program!
Hope this may be useful !

Reply With Quote
  #3 (permalink)  
Old February 14th, 2005, 09:54 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi

hi there..

if you can try not to use the end command to finish your app.

the safest way is to dispose every form once you finish with it... also how do you call the unload event?? or better how do you unload your form?? if you call it to unload and then do more things then the form will not unload...


Reply With Quote
  #4 (permalink)  
Old February 14th, 2005, 03:48 PM
Friend of Wrox
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts

"End" is dangerous, as Gonzalo already said. If what Gonzalo suggested does not work, try this.

"Not responding" status means that the application is calling an external component that is not responding. Even if that component is not called directly, VB may do it for you (for example to close the connection)
This is a not easy problem to track. What I did in the past was to make a list of all the servers I was connected to, and one by one put a 'set server = nothing', followed by a message box, in the QueryUnload event. In that way I was able to find the component that did not want to be released, and the reason why.
And be careful: in this cases the application may work perfectly in the IDE. Always debug the exe.
Let us know.
Reply With Quote
  #5 (permalink)  
Old March 9th, 2005, 02:10 AM
Authorized User
Join Date: May 2004
Location: Karachi, Sindh, Pakistan.
Posts: 83
Thanks: 0
Thanked 1 Time in 1 Post


In case what've been sujjested by other members didn't work, try this.

It appears that there's some form which is not unloaded even after you "try" to unload it. This happens when you have valid object references in your form, for example recordset and/or connection objects. The ensure your form gets unloaded, make sure that you set all the object references to Nothing in the form unload event. Also make sure you set the form itself to Nothing. This will definitely unload the form.

While an app works, however, there may be multiple forms active or loaded but hidden at any given moment. To ensure you call Unload command on every form, use code similiar to this in the unload event of your main form:

Dim frm As Form
For Each frm In Forms
    Unload frm

I'm sure it'd solve the problem you'r having.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ending tag ?> Zardooloi Intro Programming 1 August 3rd, 2007 09:11 AM
error when runing application issam BOOK: ASP.NET Website Programming Problem-Design-Solution 6 December 22nd, 2004 04:45 PM
Ending a console application FarCry VS.NET 2002/2003 9 May 26th, 2004 11:17 AM
runing my app. melvik General .NET 10 May 12th, 2004 12:01 AM

All times are GMT -4. The time now is 06:12 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.