private void FrmGenesis_Load(object sender, EventArgs e) { // pass connection string here clsConnection con = new clsConnection(); con.TestConnection(); // read registry here }