Quote:2. this.close(); // this code exits the complete program
is the main form, then the code exits the complete program (if
isn't the main form, then the particular form will be closed). If you want to execute some code after the form is closed, then go to your Program.cs file, and try this:
static class Program
static void Main()
If you don't add code after the
line, then nothing will be executed if the main form is closed, and then the application closes.
Also, C# is case-sensitive, so don't use
, also use
, and use
Hope this helps.