I tried using:
Application.Exit();
and
Environment.Exit(0);
But from what I understand, the line that I have in my code is standard for closing the program, and this is what my teacher has in my code (this is how I build my project by copying my code for buttons and t .d.).
namespace atmproject
{
public partial class form1welc : Form
{
public static form1welc Welcome = new form1welc();
public form1welc()
{
InitializeComponent();
}
private void welcexitbtn_Click(object sender, EventArgs e)
{
System.Environment.Exit(0);
}
private void welcloginbtn_Click(object sender, EventArgs e)
{
custlogin Customers = new custlogin();
this.Hide();
Customers.Show();
}
private void welcustbtn_Click(object sender, EventArgs e)
{
createcust Customers = new createcust();
this.Hide();
Customers.Show();
}
}
}
source
share