static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool bStatus = ConnectionHelper.ShowDbStatus(GetConnectionString.DbStatus); mainFrmSP2Fun mainFrm = new mainFrmSP2Fun(); if (bStatus == true) { Application.Run(new mainFrmSP2Fun()); } else { MessageBox.Show("Please Set Connection strings for SQL Server."); } }