usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespacewindowsformsapplication6{ Public Partial classForm1:form { PublicForm1 () {InitializeComponent (); } Private voidUndo Utoolstripmenuitem_click (Objectsender, EventArgs e) {Textbox1.undo (); } Private voidRepeat Rtoolstripmenuitem_click (Objectsender, EventArgs e) { } Private voidShear Ttoolstripmenuitem_click (Objectsender, EventArgs e) {textbox1.cut (); } Private voidCopy Ctoolstripmenuitem_click (Objectsender, EventArgs e) {textbox1.copy (); } Private voidPaste Ptoolstripmenuitem_click (Objectsender, EventArgs e) {Textbox1.paste (); } Private voidExit Xtoolstripmenuitem_click (Objectsender, EventArgs e) { This. Close (); } Private voidOption Otoolstripmenuitem_click (Objectsender, EventArgs e) { } Private voidtextBox1_TextChanged (Objectsender, EventArgs e) { stringA =textBox1.Text.Length.ToString (); Toolstripstatuslabel2.text=A; } }}
--------------Menus and Toolbars--------------------------------
ContextMenuStrip---------Right-click menu bar
MenuStrip------------top menu bar
StatusStrip----------Bottom Menu bar
ToolStrip------------Toolbar
ToolStripContainer-----(You can place menus, controls around)
---------Container------------------------------
FlowLayoutPanel--------(internal controls) streaming layout
GroupBox----------controls grouped with borders, headings
----
Panel-----------Controls group borders, headings
---
SplitContainer-----is a two panel.
---
TabControl--------Tabbed Tabs
---
TableLayoutPanel---------A single control in a grid-like table
--------The Lisview control-------------------------------------
Like a table
can display database contents
Notepad
Notepad and WinForm container controls