

- #Data type of each menu item object on a menustrip code
- #Data type of each menu item object on a menustrip windows
Private Sub CopyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CopyToolStripMenuItem.Click If ad.RichTextBox1.SelectionLength > 0 ThenĬlipboard.SetDataObject(ad.RichTextBox1.SelectedText) Private Sub CutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CutToolStripMenuItem.Click

’ These event procedures are for cut, copy, and paste. Private Sub CascadeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CascadeToolStripMenuItem.Click Private Sub TileVerticallyTileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TileVerticallyTileToolStripMenuItem.Click Private Sub TileHorizontallyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TileHorizontallyToolStripMenuItem.Click ’These event procedures deal with arranging child windows. Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click Private Sub CloseToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseToolStripMenuItem.Click NewChild.Text = "Document " & NewChildCount.ToString Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click MsgBox("There was an error opening the file.") ’ Move cursor to the start of the document. Sr = File.OpenText(OpenFileDialog1.FileName) OpenFileDialog1.Filter = "Text Files *.txt | *.txt" Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click SaveDocument(currentDoc, SaveFileDialog1.FileName) SaveFileDialog1.FileName = currentDoc.Text & ".txt"

SaveFileDialog1.Filter = "Text files *.txt | *.txt" SaveDocument(currentDoc, currentDoc.Text) Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Clickĭim currentDoc As Document = Me.ActiveMdiChild ’ These event procedures deal with opening, saving, creating,
#Data type of each menu item object on a menustrip code
Listing 2 shows the small amount of code for theĬontains all of the code to make it easier to use.) Listing 1 Code in the text editor’s parent form. Most of the code goes in the parent form
#Data type of each menu item object on a menustrip windows
Add a new Windows form to the project, specifying Document as the.True and the Text property to MDI Parent. With the initial form, change the IsMdiContainer property to.Create a new Visual Basic Windows application.Minimum of commands including cut, copy, and paste. The application is a text editor that permits you to Shows just how easy it is to implement a useful MDI program by using the. The remainder of this article walks you through a demonstration program that NET: The Complete and Comprehensive Developer's Guide to C# 2.0 and.
