private void UserFrm_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'patientHistoryDataSet.Bill_tbl' table. You can move, or remove it, as needed. this.bill_tblTableAdapter.Fill(this.patientHistoryDataSet.Bill_tbl); // TODO: This line of code loads data into the 'patientHistoryDataSet.Patient' table. You can move, or remove it, as needed. this.patientTableAdapter.Fill(this.patientHistoryDataSet.Patient); //Responsive Width = ResponsiveObj.GetMetrics(Width, "Width"); // Form width and height set up. Height = ResponsiveObj.GetMetrics(Height, "Height"); Left = Screen.GetBounds(this).Width / 2 - Width / 2; // Form centering. Top = Screen.GetBounds(this).Height / 2 - Height / 2 - 30; // 30 is a calibration factor. foreach (Control Ctl in this.Controls) { // Ctl.Font = new Font(FontFamily.GenericMonospace, ResponsiveObj.GetMetrics((int)Ctl.Font.Size),FontStyle.Regular); Ctl.Width = ResponsiveObj.GetMetrics(Ctl.Width, "Width"); Ctl.Height = ResponsiveObj.GetMetrics(Ctl.Height, "Height"); Ctl.Top = ResponsiveObj.GetMetrics(Ctl.Top, "Top"); Ctl.Left = ResponsiveObj.GetMetrics(Ctl.Left, "Left"); } }
private void ResponsiveForm_Load(object sender, EventArgs e) { Width = ResponsiveObj.GetMetrics(Width, "Width"); // Form width and height set up. Height = ResponsiveObj.GetMetrics(Height, "Height"); Left = Screen.GetBounds(this).Width / 2 - Width / 2; // Form centering. Top = Screen.GetBounds(this).Height / 2 - Height / 2 - 30; // 30 is a calibration factor. foreach (Control Ctl in this.Controls) { Ctl.Font = new Font(FontFamily.GenericSansSerif, ResponsiveObj.GetMetrics((int)Ctl.Font.Size), FontStyle.Regular); Ctl.Width = ResponsiveObj.GetMetrics(Ctl.Width, "Width"); Ctl.Height = ResponsiveObj.GetMetrics(Ctl.Height, "Height"); Ctl.Top = ResponsiveObj.GetMetrics(Ctl.Top, "Top"); Ctl.Left = ResponsiveObj.GetMetrics(Ctl.Left, "Left"); } }