?
Solved

Problem closing windows form

Posted on 2004-09-27
3
Medium Priority
?
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

764 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