Showing posts with label Windows Application. Show all posts
Showing posts with label Windows Application. Show all posts

Monday, May 17, 2010

How to minimize window from closing C# windows application

To minimize the window when user closes the form, use the code below.

 private void Alerts_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {               
                e.Cancel = true;
        this.WindowState = FormWindowState.Minimized;

            }           
        }

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo

Tuesday, January 20, 2009

What is application_name.vhost.exe and How to remove it?

When you build a Visual Studio 2005 project, you get two executables created, one application_name.exe and other application_name.vhost.exe. You may wondor why we need two exe files for one applcation. Actually vhost is a hosting process used by Visual Studio that improves debugging performance, enables partial trust debugging, and enables design time expression evaluation.You can disable the usage of the hosting process by clearing the “Enable the Visual Studio hosting process” check box in project properties on the Debug tab.

Reference http://msdn2.microsoft.com/en-us/library/ms185331.aspx

Add To Google BookmarksStumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditTwit ThisAdd To FacebookAdd To Yahoo