Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# load form

 
private void Logo_Load(object sender, EventArgs e)
        {
            Login login = new Login();  // my second form is login
            login.ShowDialog();
            this.Close(); // close this form  ( I name it logo form)
        }
Comment

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;
    }
}

Comment

PREVIOUS NEXT
Code Example
Csharp :: c# convert string array to int array 
Csharp :: c# set cursor pos 
Csharp :: difference between boxing and unboxing in c# 
Csharp :: split string c# 
Csharp :: C# using variables inside strings 
Csharp :: c# get all namespaces in assembly 
Csharp :: list to array c# 
Csharp :: how to get keyboard input in unity 
Csharp :: get percentage c# 
Csharp :: minimize maximize restore wpf buttons 
Csharp :: unity how to destroy child 
Csharp :: get sha1 hashcode from c# 
Csharp :: increase value in dictionary against a key in c# 
Csharp :: c# is odd number 
Csharp :: how to change dictionary value in c# 
Csharp :: random in f# 
Csharp :: how to stop a form c# 
Csharp :: comments in c# 
Csharp :: how to get a length of a string in c# 
Csharp :: c# create excel file 
Csharp :: what is void onmousedown() 
Csharp :: type or namespace text could not be found unity 
Csharp :: returning multiple values in C# 
Csharp :: primitive types c# 
Csharp :: how to close another app in system with c# 
Csharp :: prevent system shutdown c# 
Csharp :: get device name c# console 
Csharp :: linq string comparison case insensitive 
Csharp :: Scrollable WPF ListBox 
Csharp :: concat arrays .net 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =