Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a graphical user interface that allows the users to enter personal inform

ID: 3700759 • Letter: C

Question

Create a graphical user interface that allows the users to enter personal information such as their names, e-mail addresses, and phone numbers. Include a menu that provides a minimum of four features. The first displays the information entered by the user in a message box. The second clears the entries so that new values can be entered, the third menu option displays information about the application such as who developed it and what version it is. Another menu option closes the application. Be creative and be sure to produce an aesthetically pleasing design using options from the Format menu if you are using Visual Studio.

Please complete this assignment as actual C# application so you can compile and run them to see if you have any errors.

*Note* EVENT HANDLER CODES NEED TO BE ADDED TO THIS CODE AS WELL!

This is for C#

Explanation / Answer

Add MDIparent & about from using Visual Studio add form menu

MDI Parent Designer code (system generated ) :

namespace Demo2
{
partial class MDiParentForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.menuStrip = new System.Windows.Forms.MenuStrip();
this.fileMenu = new System.Windows.Forms.ToolStripMenuItem();
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.menuStrip.SuspendLayout();
this.statusStrip.SuspendLayout();
this.SuspendLayout();
//
// menuStrip
//
this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.fileMenu});
this.menuStrip.Location = new System.Drawing.Point(0, 0);
this.menuStrip.Name = "menuStrip";
this.menuStrip.Size = new System.Drawing.Size(632, 24);
this.menuStrip.TabIndex = 0;
this.menuStrip.Text = "MenuStrip";
//
// fileMenu
//
this.fileMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newToolStripMenuItem,
this.openToolStripMenuItem,
this.exitToolStripMenuItem});
this.fileMenu.ImageTransparentColor = System.Drawing.SystemColors.ActiveBorder;
this.fileMenu.Name = "fileMenu";
this.fileMenu.Size = new System.Drawing.Size(50, 20);
this.fileMenu.Text = "&Menu";
//
// newToolStripMenuItem
//
this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black;
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.newToolStripMenuItem.ShowShortcutKeys = false;
this.newToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.newToolStripMenuItem.Text = "&Enter User Info";
this.newToolStripMenuItem.Click += new System.EventHandler(this.ShowNewForm);
//
// openToolStripMenuItem
//
this.openToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Black;
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.openToolStripMenuItem.ShowShortcutKeys = false;
this.openToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.openToolStripMenuItem.Text = "&About";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.ExitToolsStripMenuItem_Click);
//
// statusStrip
//
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel});
this.statusStrip.Location = new System.Drawing.Point(0, 431);
this.statusStrip.Name = "statusStrip";
this.statusStrip.Size = new System.Drawing.Size(632, 22);
this.statusStrip.TabIndex = 2;
this.statusStrip.Text = "StatusStrip";
//
// toolStripStatusLabel
//
this.toolStripStatusLabel.Name = "toolStripStatusLabel";
this.toolStripStatusLabel.Size = new System.Drawing.Size(39, 17);
this.toolStripStatusLabel.Text = "Status";
//
// MDiParentForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(632, 453);
this.Controls.Add(this.statusStrip);
this.Controls.Add(this.menuStrip);
this.IsMdiContainer = true;
this.MainMenuStrip = this.menuStrip;
this.Name = "MDiParentForm";
this.Text = "MDiParentForm";
this.menuStrip.ResumeLayout(false);
this.menuStrip.PerformLayout();
this.statusStrip.ResumeLayout(false);
this.statusStrip.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();

}
#endregion


private System.Windows.Forms.MenuStrip menuStrip;
private System.Windows.Forms.StatusStrip statusStrip;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel;
private System.Windows.Forms.ToolStripMenuItem fileMenu;
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolTip toolTip;
}
}

---------------------------------------------------------------

MDI parent class source code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Demo2
{
public partial class MDiParentForm : Form
{
private int childFormNumber = 0;

public MDiParentForm()
{
InitializeComponent();
}

private void ShowNewForm(object sender, EventArgs e)
{
// open the form
Form16 childForm = new Form16();
childForm.MdiParent = this;
childForm.Text = "Window " + childFormNumber++;
childForm.Show();
}

private void ExitToolsStripMenuItem_Click(object sender, EventArgs e)
{
// close the application
this.Close();
}


  
private void CloseAllToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (Form childForm in MdiChildren)
{
childForm.Close();
}
}

private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
// open about box
AboutBox1 aboutBox1 = new AboutBox1();
aboutBox1.Show();
}
}
}

-----------------------------
Form Source Code :

using System;
using System.Windows.Forms;

namespace Demo2
{
public partial class Form16 : Form
{
public Form16()
{
InitializeComponent();
}

private void Form16_Load(object sender, EventArgs e)
{

}
public void rest()
{
// Rest the value
txtName.Text = "";
txtemailAddress.Text = "";
txtPhoneNo.Text = "";
  

}

private void button1_Click(object sender, EventArgs e)
{
// Show the value
string Details = string.Format("Name: {0}, Email Add: {1}, Phone No: {2}", txtName.Text, txtemailAddress.Text, txtPhoneNo.Text);
MessageBox.Show(" User Info " + Details + "");
}

private void button2_Click(object sender, EventArgs e)
{
rest();
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote