Programming
auto application close

Question Description

code of auto application close in win form application in visual studio 2010

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

using System;
using System.Windows.Forms;
using System.Drawing;

class TestClass
  {
  static void Main(string[] args)
  {
  System.Windows.Forms.Application.EnableVisualStyles();
  Application.SetCompatibleTextRenderingDefault(false);
  Application.Run(new myForm());
  }
  }


using System;
using System.Collections.Generic;

 ...
  public partial class myForm : Form
 {
 int x = 0;
 }
 ...


I want to close myForm automatically when x = 0 and do not close when x = 1;

(may be this helps )

Faris123 (10)
UT Austin

Anonymous
Just the thing I needed, saved me a lot of time.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4