Application Close

Still in Process showing its running.

Page 1 of 1

3 Replies - 991 Views - Last Post: 17 June 2009 - 07:55 PM Rate Topic: -----

#1 crzyone9584  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 198
  • Joined: 22-April 08

Application Close

Posted 17 June 2009 - 07:31 PM

I have this for the exit button. Not sure if its correct.

private void Form1_Close(object sender, EventArgs e)
{
Application.Exit();

}
But when I look at the process the program is still running. I have a form that is hidden. with

this.Hide();


So I'm thinking that'ts whey its still running. How would I close the hidden form?

This post has been edited by crzyone9584: 17 June 2009 - 07:35 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Application Close

#2 papuccino1  Icon User is offline

  • His name was Robert Paulson.
  • member icon

Reputation: 62
  • View blog
  • Posts: 1,121
  • Joined: 02-March 08

Re: Application Close

Posted 17 June 2009 - 07:41 PM

Application.Exit() closes every instance of your program. Maybe the process you see is something entirely unrelated to your software.
Was This Post Helpful? 0
  • +
  • -

#3 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4187
  • View blog
  • Posts: 11,845
  • Joined: 18-April 07

Re: Application Close

Posted 17 June 2009 - 07:44 PM

If you see a process "projectname.vhost.exe" in your processes, that is just the project opened up through visual studio. It is not your actual project running.

Just in case that is what you see. :)

This post has been edited by Martyr2: 17 June 2009 - 07:45 PM

Was This Post Helpful? 0
  • +
  • -

#4 crzyone9584  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 198
  • Joined: 22-April 08

Re: Application Close

Posted 17 June 2009 - 07:55 PM

In the process there is

myproject.vshost.exe
myproject.exe
they are both using the same ammount of mem. Should they both be there when im running VS and done debugging?

also would my code be correct for the exit button on the form?

This post has been edited by crzyone9584: 17 June 2009 - 07:59 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1