Link to home
Start Free TrialLog in
Avatar of dmxflames
dmxflames

asked on

Problem closing windows form

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
ASKER CERTIFIED SOLUTION
Avatar of KGreg
KGreg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thenrich
thenrich

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.
Can you post the code of your control.