public UserControlQuery(string q, string d, FormDataServer fds) { InitializeComponent(); Fds = fds; _dsn = d; QueryName = q; _hideSelection = new Control(); }
private void buttonLogin_Click(object sender, EventArgs e) { try { FormDataServer newMdiChild = new FormDataServer(); // Set the Parent Form of the Child window. newMdiChild.MdiParent = _frmMain; // Display the new form. newMdiChild.Show(); newMdiChild.LoadFromDb(_cs.ConnectString, _db); Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }