more designer. added context menu

This commit is contained in:
EggMan20339 2024-02-14 10:02:15 -05:00
parent b26d4cb46b
commit c3ddf9fdd7
6 changed files with 55 additions and 1 deletions

Binary file not shown.

BIN
Database3.zip Normal file

Binary file not shown.

View File

@ -16,7 +16,7 @@ namespace Database3
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new frmEdit()); Application.Run(new frmSearch());
} }
} }
} }

View File

@ -29,6 +29,7 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.lblDisStID = new System.Windows.Forms.Label(); this.lblDisStID = new System.Windows.Forms.Label();
this.dgvStudents = new System.Windows.Forms.DataGridView(); this.dgvStudents = new System.Windows.Forms.DataGridView();
this.lblDislname = new System.Windows.Forms.Label(); this.lblDislname = new System.Windows.Forms.Label();
@ -37,7 +38,13 @@
this.txtlname = new System.Windows.Forms.TextBox(); this.txtlname = new System.Windows.Forms.TextBox();
this.txtDOB = new System.Windows.Forms.TextBox(); this.txtDOB = new System.Windows.Forms.TextBox();
this.btnSearch = new System.Windows.Forms.Button(); this.btnSearch = new System.Windows.Forms.Button();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.cmuSearch = new System.Windows.Forms.ToolStripMenuItem();
this.cmuEdit = new System.Windows.Forms.ToolStripMenuItem();
this.cmuDelete = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.dgvStudents)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvStudents)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// lblDisStID // lblDisStID
@ -106,12 +113,42 @@
this.btnSearch.UseVisualStyleBackColor = true; this.btnSearch.UseVisualStyleBackColor = true;
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
// //
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripSeparator1, this.cmuSearch, this.cmuEdit, this.cmuDelete });
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(110, 76);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(106, 6);
//
// cmuSearch
//
this.cmuSearch.Name = "cmuSearch";
this.cmuSearch.Size = new System.Drawing.Size(109, 22);
this.cmuSearch.Text = "Search";
//
// cmuEdit
//
this.cmuEdit.Name = "cmuEdit";
this.cmuEdit.Size = new System.Drawing.Size(109, 22);
this.cmuEdit.Text = "Edit";
//
// cmuDelete
//
this.cmuDelete.Name = "cmuDelete";
this.cmuDelete.Size = new System.Drawing.Size(109, 22);
this.cmuDelete.Text = "Delete";
//
// frmSearch // frmSearch
// //
this.AcceptButton = this.btnSearch; this.AcceptButton = this.btnSearch;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450); this.ClientSize = new System.Drawing.Size(800, 450);
this.ContextMenuStrip = this.contextMenuStrip1;
this.Controls.Add(this.btnSearch); this.Controls.Add(this.btnSearch);
this.Controls.Add(this.txtDOB); this.Controls.Add(this.txtDOB);
this.Controls.Add(this.txtlname); this.Controls.Add(this.txtlname);
@ -122,11 +159,20 @@
this.Controls.Add(this.lblDisStID); this.Controls.Add(this.lblDisStID);
this.Name = "frmSearch"; this.Name = "frmSearch";
this.Text = "Form1"; this.Text = "Form1";
this.Load += new System.EventHandler(this.frmSearch_Load);
((System.ComponentModel.ISupportInitialize)(this.dgvStudents)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvStudents)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem cmuSearch;
private System.Windows.Forms.ToolStripMenuItem cmuEdit;
private System.Windows.Forms.ToolStripMenuItem cmuDelete;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.Label lblDislname; private System.Windows.Forms.Label lblDislname;
private System.Windows.Forms.Label lblDisDOB; private System.Windows.Forms.Label lblDisDOB;
private System.Windows.Forms.TextBox txtStuID; private System.Windows.Forms.TextBox txtStuID;

View File

@ -73,6 +73,11 @@ namespace Database3
MessageBox.Show($"An error occurred: {ex.Message}"); MessageBox.Show($"An error occurred: {ex.Message}");
} }
} }
private void frmSearch_Load(object sender, EventArgs e)
{
} }
}
} }

View File

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>