[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Problem closing windows form

Posted on 2004-09-27
3
Medium Priority
?
250 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 375 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month18 days, 4 hours left to enroll

831 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