Home

SpeakComputers.com | Text-to-Speech Software

Natural sounding TTS voice support | Cepstral TTS voices | Text to MP3 | Natural Readers

Text to Speech Software Text to Speech Voices SpeakComputer Text to Speech Software

MenuStrip Control.

The Windows MenuStrip control provides an application menu system. The menustrip works with both Single document interfaces SDI and Multiple document interfaces MDI. With MDI applications the MenuStrip can be configured to merge with the main form for better navigation.

The new Menu of Visual Studio and the .net control set allows you to add image files to the menu structure. Interface developers can now take advantage of the new look and feel of the .net control.

Namespace: System.Windows.Forms
Assembly: Systems.Windows.Forms.dll

using System.Windows.Forms;
Calling: System.Windows.Forms.MenuStrip

Adding a MenuStrip to a Form.
Using VisualStudio, adding a MenuStrip and ToolStripMenuItem is quick and easy.

With a form open in design view, double click the MenuStrip item on the toolbox. This will add the MenuStrip control to the form. To add ToolStripMenuItem, simply start building your menu structure.

Creating MenuStrips and MenuItems have never been so easy. Visual Studio 2005 make programming and developing easy and fun. Simple put, Visual Studio 2005 is a more productive programming IDE tool.

To add a MenuStrip writing code.

Create the MenuStrip control and add it to the forms.
MenuStrip MainMenu = new MenuStrip();
this.Controls.Add(MainMenu); 

Add the File menu Item and add it to the MenuStrip above.
ToolStripMenuItem File = new ToolStripMenuItem("File"); MainMenu.Items.Add(File);

Create the New menu Items and add it to the FileMenu above. We are also going to create the click event for the item.
ToolStripMenuItem New = new ToolStripMenuItem("New");
New.Click += new EventHandler(New_Click);
File.DropDownItems.Add(New);

Create the Open menu Item and ad it to the FileMenu as you did above.
ToolStripMenuItem Open = new ToolStripMenuItem("Open");
Open.Click += new EventHandler(Open_Click);
File.DropDownItems.Add(Open);

Carry on in this manner to complete your menu structure. We now need to respond to the click events we created earlier.

void New_Click(object sender, EventArgs e) { MessageBox.Show(sender.ToString()); }
void Open_Click(object sender, EventArgs e) { MessageBox.Show(sender.ToString()); }

Note:

The MenuStrip, ContextMenuStrip and ToolStrip items can use the same events.
Top of page
Text to Speech Speech synthesis Software TTS Software
Copy Right 2006 SpeakComputers.com - All Rights Reserved.
About Privacy Policy TTS Resouces
Free Text to Speech software
Free Text to Speech Software