Solved

Problem closing windows form

Posted on 2004-09-27
3
222 Views
Last Modified: 2010-04-23
Hi folks,
      I am developing a set of user controls components for a program. The main user control consists of a tab control which can add content as tabs when loaded. For example a user control which I use to authenticate clients has got a "Logon" button. When I click on the Logon button, it loads another control on the tab control as a tab page.
     However, when I have loaded the content on the tab control, I find It difficult to close the windows form hosting the main user control. I can only kill the form by using the "Control -Alt Delete Method"
      Is that garbage collection is late and the windows form can not close because of open resources ?Do I need to explicitly call the dispose method?  PLease help me.
#Dmxflames
0
Comment
Question by:dmxflames
3 Comments
 
LVL 6

Accepted Solution

by:
KGreg earned 125 total points
ID: 12163597
If you're using threads, you need to kill them.  If you have dynamically created disposable objects, dispose of them.

Try that and let me know..  also are you capturing the close or closing events?

KGREG
0
 
LVL 5

Expert Comment

by:thenrich
ID: 12168845
You've got something else going on. The correct solution would be to call the Me.close in the close button of the form and put a me.dispose in the finialize event of the controls. I'm thinking 1 of your controls is procsessing something.
0
 
LVL 8

Expert Comment

by:wguerram
ID: 12172438
Can you post the code of your control.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 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