1

I created a Windows Forms project in VB.net and I have decided to add another form to appear before Form1. How can I make a different form appear on start up instead of Form1?

enter image description here

Jeremy Lin
  • 400
  • 3
  • 13

3 Answers3

2

Open up your project properties (you can double-click on it in the Solution Explorer) Go to Application > Startup Form

At least that's how I do it in VS 2010.

Hope that does the trick for you too...

John Bustos
  • 19,036
  • 17
  • 89
  • 151
2

To set the startup form in Windows Forms:

In Solution Explorer, right-click the project and choose Properties.

The Project property page opens with the General properties displayed.

Choose the form you want as the startup form from the Startup Object drop-down list.

Karl Anderson
  • 34,606
  • 12
  • 65
  • 80
0

If this does not work I have another solution. go to SOLUTION EXPLORER , then open PROGRAM.CS (just click the down-arrow next to it) after that open PROGRAM (again just click the little down-arrow next to it) and double click Main() : void . That will take you to its code. Which will look like this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Ednevnik
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new LoginSystem());
        }
    }
}

In the last line you can see LoginSystem() (that is the name of the form that opens at the start) so you just have to change that to the name of the form you want to open.

Silk.Road
  • 1
  • 1