public static void Resizeformmdiparent(Form myform, ToolStripButton toolStripButton2) { var img = new FrmSystemImages(); if (myform.WindowState == FormWindowState.Maximized) { myform.WindowState = FormWindowState.Normal; toolStripButton2.Image = img.maximum.Image; toolStripButton2.ToolTipText = "Maximize"; // myform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; } else { myform.WindowState = FormWindowState.Maximized; toolStripButton2.Image = img.normal.Image; toolStripButton2.ToolTipText = "Restore"; // myform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; myform.FormBorderStyle = FormBorderStyle.None; } }
private void FrmSystemMainList_Load(object sender, EventArgs e) { //Form Load var img = new FrmSystemImages(); txtsimpleSearch.KeyPress += new KeyPressEventHandler(TbPassword_KeyPress); FormBorderStyle = FormBorderStyle.None; // WindowState = FormWindowState.Maximized; this.comboBox2.KeyPress += ClassPublicclass.Numbersonly; // Ensure that the view is set to show details. listView2.View = View.Details; refresh.Image = img.refrech.Image; pdf.Image = img.pdf.Image; excel.Image = img.excel.Image; word.Image = img.word.Image; btnMinimize.Image = img.minimize.Image; btnMaximize.Image = img.maximum.Image; btnClose.Image = img.close.Image; btnMaximize.Image = img.normal.Image; BackColor = ClassMainclass.FormColor; toolStrip4.BackColor = ClassMainclass.ToolstripColor; toolStrip1.BackColor = ClassMainclass.ToolstripColor; button1.BackColor = ClassMainclass.ToolstripColor; panel4.BackColor = ClassMainclass.ToolstripColor; panel5.BackColor = ClassMainclass.ToolstripColor; panel14.BackColor = ClassMainclass.ToolstripColor; button2.BackColor = ClassMainclass.ToolstripColor; button3.BackColor = ClassMainclass.ToolstripColor; toolStripLabel1.ForeColor = ClassMainclass.ToolstripFontColor; panel11.BackColor = ClassMainclass.ToolstripColor; label4.BackColor = ClassMainclass.ToolstripColor; label4.ForeColor = ClassMainclass.ToolstripFontColor; button4.BackColor = ClassMainclass.ToolstripColor; button4.ForeColor = ClassMainclass.ToolstripFontColor; button5.BackColor = ClassMainclass.ToolstripColor; button5.ForeColor = ClassMainclass.ToolstripFontColor; button6.BackColor = ClassMainclass.ToolstripColor; button6.ForeColor = ClassMainclass.ToolstripFontColor; FormBorderStyle = FormBorderStyle.None; toolStripLabel1.Text = Text + " "; if (comboBox2.Text == "ALL") { ClassMainclass.listselect = " "; } else { ClassMainclass.listselect = "TOP " + comboBox2.Text + " "; } try { fullsql = ClassAMaincList.Listsql(txtTableName.Text, " ID,", ClassMainclass.listselect); } catch { } try { shortsql = ClassAMaincList.Listsql(txtTableName.Text, " ", ClassMainclass.listselect); } catch { } ClassPublicclass.Selectfromtablecountlbl(label8, txtTableName.Text, "ID", ""); txtTableName.Text = cmbTableName.Text; txtServerName.Text = listboxSQLServerInstances.Text; txtDatabaseName.Text = listboxSQLServerDatabaseInstances.Text; }