Hi
Login is getting loaded but not showing message . Below are the Forms
static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Login()); } } public partial class Login : Form { SqlCommand cmd; SqlConnection cn; SqlDataReader dr; public Login() { InitializeComponent(); } private void Login_Load(object sender, EventArgs e) { MessageBox.Show("connecting with sql server"); SqlConnection cnn = DatabaseConnection.GetInstance(); //execute queries string query = "SELECT * FROM Login"; SqlCommand command = new SqlCommand(query, cnn); cnn.Open(); DataSet ds = new DataSet(); MessageBox.Show("connect with sql server"); } private void Btnregister_Click(object sender, EventArgs e) { //this.Hide(); ////Registration registration = new Registration(); //registration.ShowDialog(); } }
Thanks