.... And this will show Form2, and Hide Form1
Code:static void Main() { // Instantiate a new instance of Form1. Form1 f1 = new Form1(); Form2 f2 = new Form2(); // Display a messagebox. This shows the application // is running, yet there is nothing shown to the user. // This is the point at which you customize your form. System.Windows.Forms.MessageBox.Show("The application " + "is running now, but no forms have been shown."); // Customize the form. f1.Text = "Running Form"; // Show the instance of the form modally. f1.Visible = false; f2.ShowDialog(); }




Reply With Quote