Posted 26 February 2009 - 04:35 PM
When you create a program that features a single Windows Form using Visual C#'s Windows Form Designer, three source files are created:
1. program.cs, which:
.....a. does some preliminary configuration of the form and then launches it, and <-- couldn't configuration be done transparently upon launching?
.....b. all the user-written, non-form-related stuff.
2. form1.cs, whose generated code contains that part of the form's class that is to be editted by the user, including "empty" methods:
.....a. the constructor, which calls InitializeComponent, which initializes the form, and
.....b. various user-written, event-driven methods, which:
..........1. handle "operation" of the form, and
..........2. call Application.Exit, which terminates execution of the form.
3. form1.designer.cs, whose generated code contains that part of the form's class that is NOT to be editted by the user:
.....a. the Windows Form Designer generated method InitializeComponent, and
.....b. the method Dispose, which disposes of the form. <-- can't this be editted?