PC Review


Reply
Thread Tools Rate Thread

Application Still In Use after Closing Main Form

 
 
Neelima Godugu
Guest
Posts: n/a
 
      26th Aug 2004
Hi
I am experiencing a weird issue.
I have an application that has multiple forms.The Startup class of the
application is a Class(not a form) named Application.
I instantiate all forms in the static Main method of this class.
Finally I do
System.Windows.Forms.Application.Run(frmEntityList);
at the end of main method.

To exit from the app I do the following

1. Close DB Connection
2. frmEntityList.Close();

The form disappears but the application is still in use. I verified this by
trying to overwrite the Application exe.

I am baffled by this.

Your help is appreciated.

TIA
Neelima Godugu


 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      26th Aug 2004
1. The form is closed, not minimized? If it's a PPC and it has an (X)
instak of (ok) in the corner, then it's only minimized.
2. Are you running any worker threads that you don't stop befoer leaving the
app?

-Chris


"Neelima Godugu" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
> I am experiencing a weird issue.
> I have an application that has multiple forms.The Startup class of the
> application is a Class(not a form) named Application.
> I instantiate all forms in the static Main method of this class.
> Finally I do
> System.Windows.Forms.Application.Run(frmEntityList);
> at the end of main method.
>
> To exit from the app I do the following
>
> 1. Close DB Connection
> 2. frmEntityList.Close();
>
> The form disappears but the application is still in use. I verified this

by
> trying to overwrite the Application exe.
>
> I am baffled by this.
>
> Your help is appreciated.
>
> TIA
> Neelima Godugu
>
>



 
Reply With Quote
 
Neelima Godugu
Guest
Posts: n/a
 
      26th Aug 2004
Hi Chris
Thanks for the prompt reply. I am aware of the "X" issue and that is not the
case here. I am calling a method to close the Main Form.
I dont think I have any threads. But I will double check(as I took over the
project from somebody else, i am not 100% sure). Any other ideas?

"Chris Tacke, eMVP" <ctacke[at]OpenNETCF_dot_org> wrote in message
news:OQs$(E-Mail Removed)...
> 1. The form is closed, not minimized? If it's a PPC and it has an (X)
> instak of (ok) in the corner, then it's only minimized.
> 2. Are you running any worker threads that you don't stop befoer leaving

the
> app?
>
> -Chris
>
>
> "Neelima Godugu" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi
> > I am experiencing a weird issue.
> > I have an application that has multiple forms.The Startup class of the
> > application is a Class(not a form) named Application.
> > I instantiate all forms in the static Main method of this class.
> > Finally I do
> > System.Windows.Forms.Application.Run(frmEntityList);
> > at the end of main method.
> >
> > To exit from the app I do the following
> >
> > 1. Close DB Connection
> > 2. frmEntityList.Close();
> >
> > The form disappears but the application is still in use. I verified this

> by
> > trying to overwrite the Application exe.
> >
> > I am baffled by this.
> >
> > Your help is appreciated.
> >
> > TIA
> > Neelima Godugu
> >
> >

>
>



 
Reply With Quote
 
Neelima Godugu
Guest
Posts: n/a
 
      26th Aug 2004
Hi
I checked and there are no threads.
I also tried making frmEntityList the Startup class and it did not help.
Is there any way to detect what objects are still in use after the
application shutsdown?
Thanks

"Chris Tacke, eMVP" <ctacke[at]OpenNETCF_dot_org> wrote in message
news:OQs$(E-Mail Removed)...
> 1. The form is closed, not minimized? If it's a PPC and it has an (X)
> instak of (ok) in the corner, then it's only minimized.
> 2. Are you running any worker threads that you don't stop befoer leaving

the
> app?
>
> -Chris
>
>
> "Neelima Godugu" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi
> > I am experiencing a weird issue.
> > I have an application that has multiple forms.The Startup class of the
> > application is a Class(not a form) named Application.
> > I instantiate all forms in the static Main method of this class.
> > Finally I do
> > System.Windows.Forms.Application.Run(frmEntityList);
> > at the end of main method.
> >
> > To exit from the app I do the following
> >
> > 1. Close DB Connection
> > 2. frmEntityList.Close();
> >
> > The form disappears but the application is still in use. I verified this

> by
> > trying to overwrite the Application exe.
> >
> > I am baffled by this.
> >
> > Your help is appreciated.
> >
> > TIA
> > Neelima Godugu
> >
> >

>
>



 
Reply With Quote
 
Trollpower
Guest
Posts: n/a
 
      27th Aug 2004
What do you do to close/exit your app. I use Application.exit which work great.

Do you hide the Forms or do you close them (Form.Close() oder Form.hide())?

Greetings

Jens

"Neelima Godugu" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Hi
> I checked and there are no threads.
> I also tried making frmEntityList the Startup class and it did not help.
> Is there any way to detect what objects are still in use after the
> application shutsdown?
> Thanks
>
> "Chris Tacke, eMVP" <ctacke[at]OpenNETCF_dot_org> wrote in message
> news:OQs$(E-Mail Removed)...
> > 1. The form is closed, not minimized? If it's a PPC and it has an (X)
> > instak of (ok) in the corner, then it's only minimized.
> > 2. Are you running any worker threads that you don't stop befoer leaving

> the
> > app?
> >
> > -Chris
> >
> >
> > "Neelima Godugu" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi
> > > I am experiencing a weird issue.
> > > I have an application that has multiple forms.The Startup class of the
> > > application is a Class(not a form) named Application.
> > > I instantiate all forms in the static Main method of this class.
> > > Finally I do
> > > System.Windows.Forms.Application.Run(frmEntityList);
> > > at the end of main method.
> > >
> > > To exit from the app I do the following
> > >
> > > 1. Close DB Connection
> > > 2. frmEntityList.Close();
> > >
> > > The form disappears but the application is still in use. I verified this

> by
> > > trying to overwrite the Application exe.
> > >
> > > I am baffled by this.
> > >
> > > Your help is appreciated.
> > >
> > > TIA
> > > Neelima Godugu
> > >
> > >

> >
> >

 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      27th Aug 2004
Are you using a Thread.Timer (as opposed to a Forms.Timer)?

-Chris


"Neelima Godugu" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi Chris
> Thanks for the prompt reply. I am aware of the "X" issue and that is not

the
> case here. I am calling a method to close the Main Form.
> I dont think I have any threads. But I will double check(as I took over

the
> project from somebody else, i am not 100% sure). Any other ideas?
>
> "Chris Tacke, eMVP" <ctacke[at]OpenNETCF_dot_org> wrote in message
> news:OQs$(E-Mail Removed)...
> > 1. The form is closed, not minimized? If it's a PPC and it has an (X)
> > instak of (ok) in the corner, then it's only minimized.
> > 2. Are you running any worker threads that you don't stop befoer leaving

> the
> > app?
> >
> > -Chris
> >
> >
> > "Neelima Godugu" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi
> > > I am experiencing a weird issue.
> > > I have an application that has multiple forms.The Startup class of the
> > > application is a Class(not a form) named Application.
> > > I instantiate all forms in the static Main method of this class.
> > > Finally I do
> > > System.Windows.Forms.Application.Run(frmEntityList);
> > > at the end of main method.
> > >
> > > To exit from the app I do the following
> > >
> > > 1. Close DB Connection
> > > 2. frmEntityList.Close();
> > >
> > > The form disappears but the application is still in use. I verified

this
> > by
> > > trying to overwrite the Application exe.
> > >
> > > I am baffled by this.
> > >
> > > Your help is appreciated.
> > >
> > > TIA
> > > Neelima Godugu
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Neelima Godugu
Guest
Posts: n/a
 
      30th Aug 2004
Hi Chris,
I am not using any timer.

"Chris Tacke, eMVP" <ctacke[at]OpenNETCF_dot_org> wrote in message
news:(E-Mail Removed)...
> Are you using a Thread.Timer (as opposed to a Forms.Timer)?
>
> -Chris
>
>
> "Neelima Godugu" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi Chris
> > Thanks for the prompt reply. I am aware of the "X" issue and that is not

> the
> > case here. I am calling a method to close the Main Form.
> > I dont think I have any threads. But I will double check(as I took over

> the
> > project from somebody else, i am not 100% sure). Any other ideas?
> >
> > "Chris Tacke, eMVP" <ctacke[at]OpenNETCF_dot_org> wrote in message
> > news:OQs$(E-Mail Removed)...
> > > 1. The form is closed, not minimized? If it's a PPC and it has an

(X)
> > > instak of (ok) in the corner, then it's only minimized.
> > > 2. Are you running any worker threads that you don't stop befoer

leaving
> > the
> > > app?
> > >
> > > -Chris
> > >
> > >
> > > "Neelima Godugu" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Hi
> > > > I am experiencing a weird issue.
> > > > I have an application that has multiple forms.The Startup class of

the
> > > > application is a Class(not a form) named Application.
> > > > I instantiate all forms in the static Main method of this class.
> > > > Finally I do
> > > > System.Windows.Forms.Application.Run(frmEntityList);
> > > > at the end of main method.
> > > >
> > > > To exit from the app I do the following
> > > >
> > > > 1. Close DB Connection
> > > > 2. frmEntityList.Close();
> > > >
> > > > The form disappears but the application is still in use. I verified

> this
> > > by
> > > > trying to overwrite the Application exe.
> > > >
> > > > I am baffled by this.
> > > >
> > > > Your help is appreciated.
> > > >
> > > > TIA
> > > > Neelima Godugu
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Neelima Godugu
Guest
Posts: n/a
 
      30th Aug 2004
I am doing the following

1.Closing DB Connection
2. Main_Form.Close();


"Trollpower" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> What do you do to close/exit your app. I use Application.exit which work

great.
>
> Do you hide the Forms or do you close them (Form.Close() oder

Form.hide())?
>
> Greetings
>
> Jens
>
> "Neelima Godugu" <(E-Mail Removed)> wrote in message

news:<(E-Mail Removed)>...
> > Hi
> > I checked and there are no threads.
> > I also tried making frmEntityList the Startup class and it did not help.
> > Is there any way to detect what objects are still in use after the
> > application shutsdown?
> > Thanks
> >
> > "Chris Tacke, eMVP" <ctacke[at]OpenNETCF_dot_org> wrote in message
> > news:OQs$(E-Mail Removed)...
> > > 1. The form is closed, not minimized? If it's a PPC and it has an

(X)
> > > instak of (ok) in the corner, then it's only minimized.
> > > 2. Are you running any worker threads that you don't stop befoer

leaving
> > the
> > > app?
> > >
> > > -Chris
> > >
> > >
> > > "Neelima Godugu" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Hi
> > > > I am experiencing a weird issue.
> > > > I have an application that has multiple forms.The Startup class of

the
> > > > application is a Class(not a form) named Application.
> > > > I instantiate all forms in the static Main method of this class.
> > > > Finally I do
> > > > System.Windows.Forms.Application.Run(frmEntityList);
> > > > at the end of main method.
> > > >
> > > > To exit from the app I do the following
> > > >
> > > > 1. Close DB Connection
> > > > 2. frmEntityList.Close();
> > > >
> > > > The form disappears but the application is still in use. I verified

this
> > by
> > > > trying to overwrite the Application exe.
> > > >
> > > > I am baffled by this.
> > > >
> > > > Your help is appreciated.
> > > >
> > > > TIA
> > > > Neelima Godugu
> > > >
> > > >
> > >
> > >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form with subforms - slow on closing of main form =?Utf-8?B?UmljaGFyZA==?= Microsoft Access Form Coding 0 8th Jun 2007 04:51 PM
Closing event in a MID Child form I don't know if the child form is closing or the main form is closing **Developer** Microsoft C# .NET 1 19th Oct 2005 04:51 PM
C# Closing login form when main form opens John Wolrehammer Microsoft Dot NET 1 15th Jan 2004 12:20 AM
Closing the main form while application runs Jim Shaw Microsoft Access Form Coding 5 30th Nov 2003 02:28 AM
Closing an Application in the Main Form Constructor Peter D. Dunlap Microsoft Dot NET Framework Forms 2 18th Sep 2003 10:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:12 PM.