We will add some Menu items to the MenuStrip. The first Item will we a new Menu Drop Down called Format.
In the format Drop Down Menu add a menu item called Word Wrap. Set the Checked Property to true, set the CheckOnClick Property to true. Now select the TextBox(txtBox) and set the WordWrap property to true.
Now go back to the Format menu and add one more menu item call it Font.
Drag a FontDialog onto the Form, call it fontDialog
Go to the Font menu item's Click() event and type
Code:
fontDialog.ShowColor = true;
fontDialog.ShowEffects = true;
if (fontDialog.ShowDialog(this) == DialogResult.OK)
{
txtBox.ForeColor = fontDialog.Color;
txtBox.Font = fontDialog.Font;
}
For the New menu item's shortcut key type in Ctrl+N
For the Open menu item's shortcut key type in Ctrl+O
For the Save menu item's shortcut key type in Ctrl+S
For the Save As menu item's shortcut key type in Ctrl+Shift+S
For the Print menu item's shortcut key type in Ctrl+P
For the Print Preview menu item's shortcut key type in Ctrl+Shift+P
For the Undo menu item's shortcut key type in Ctrl+Z
For the Cut menu item's shortcut key type in Ctrl+X
For the Copy menu item's shortcut key type in Ctrl+C
For the Paste menu item's shortcut key type in Ctrl+V
For the Select All menu item's shortcut key type in Ctrl+A
For the Font menu item's shortcut key type in Alt+F
Now we will add a StatusStrip()
Make sure that it is docked to the bottom, then Right Click on txtBox and select Bring to Front.
Now add a StatusLabel to the StatusStrip by selecting the small arrow on the StatusStrip, call it statusLabel.
Now go to the txtBox's TextChanged() event and type
Code:
Int32 lines = txtBox.Lines.Length;
Int32 textLength = txtBox.Text.Length;
statusLabel.Text = "Lines: " + lines + " Characters: " + textLength;
Now go to the Word Wrap menu item's Click() event and type
Code:
txtBox.WordWrap = wordWrapToolStripMenuItem.Checked;
wordWrapToolStripMenuItem.Checked = txtBox.WordWrap;






