Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# load form


static class Program {
    [STAThread]
    static void Main() {
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
        var start = new Form1();
        start.FormClosed += WindowClosed;
        start.Show();
        Application.Run();
    }

    static void WindowClosed(object sender, FormClosedEventArgs e) {
        if (Application.OpenForms.Count == 0) Application.Exit();
        else Application.OpenForms[0].FormClosed += WindowClosed;
    }
}

Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #load #form
ADD COMMENT
Topic
Name
7+7 =