MenuStrip
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace win4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void menuStrip1_ItemClicked(object sender,
ToolStripItemClickedEventArgs e)
{
private void Form1_Load(object sender, EventArgs e)
{
private void tt4_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Really Quit?", "Exit",
MessageBoxButtons.OKCancel) == DialogResult.OK)
{
Application.Exit();
}
}
}
}
ToolStrip
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace win5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
toolStripLabel1.Text = "Button1 is clicked";
}
private void toolStripLabel1_Click(object sender, EventArgs e)
{
}
}
}
StatusStrip
using System;
using System.Windows.Forms;
namespace StatusBarDateTime
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//Timer Tick Event
private void timer1_Tick(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = DateTime.Today.ToLongDateString();
}
}
}