Application.Run should be written in the Program.cs in the Main() method. Sample code given below -
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmLogin());
}