Imports System.Windows.Forms
public class CreateMenuAndAttachAction
public Shared Sub Main
Application.Run(New Form1)
End Sub
End class
Public Class Form1
Inherits System.Windows.Forms.Form
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Private components As System.ComponentModel.IContainer
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem7 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem8 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem10 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem11 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem12 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem14 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem15 As System.Windows.Forms.MenuItem
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents SaveFileDialog1 As System.Windows.Forms.SaveFileDialog
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem8 = New System.Windows.Forms.MenuItem
Me.MenuItem9 = New System.Windows.Forms.MenuItem
Me.MenuItem10 = New System.Windows.Forms.MenuItem
Me.MenuItem11 = New System.Windows.Forms.MenuItem
Me.MenuItem12 = New System.Windows.Forms.MenuItem
Me.MenuItem13 = New System.Windows.Forms.MenuItem
Me.MenuItem14 = New System.Windows.Forms.MenuItem
Me.MenuItem15 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
Me.MenuItem4 = New System.Windows.Forms.MenuItem
Me.MenuItem5 = New System.Windows.Forms.MenuItem
Me.MenuItem6 = New System.Windows.Forms.MenuItem
Me.MenuItem7 = New System.Windows.Forms.MenuItem
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2, Me.MenuItem3, Me.MenuItem4, Me.MenuItem5, Me.MenuItem6, Me.MenuItem7})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem8, Me.MenuItem11, Me.MenuItem12, Me.MenuItem13, Me.MenuItem14, Me.MenuItem15})
Me.MenuItem1.Text = "File"
'
'MenuItem8
'
Me.MenuItem8.Index = 0
Me.MenuItem8.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem9, Me.MenuItem10})
Me.MenuItem8.Text = "New"
'
'MenuItem9
'
Me.MenuItem9.Index = 0
Me.MenuItem9.Text = "File"
'
'MenuItem10
'
Me.MenuItem10.Index = 1
Me.MenuItem10.Text = "Project"
'
'MenuItem11
'
Me.MenuItem11.Index = 1
Me.MenuItem11.Text = "Open"
'
'MenuItem12
'
Me.MenuItem12.Index = 2
Me.MenuItem12.Text = "Save"
'
'MenuItem13
'
Me.MenuItem13.Index = 3
Me.MenuItem13.Text = "-"
'
'MenuItem14
'
Me.MenuItem14.Index = 4
Me.MenuItem14.Text = "New"
'
'MenuItem15
'
Me.MenuItem15.Index = 5
Me.MenuItem15.Text = "Add"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.Text = "Edit"
'
'MenuItem3
'
Me.MenuItem3.Index = 2
Me.MenuItem3.Text = "View"
'
'MenuItem4
'
Me.MenuItem4.Index = 3
Me.MenuItem4.Text = "Project"
'
'MenuItem5
'
Me.MenuItem5.Index = 4
Me.MenuItem5.Text = "Create"
'
'MenuItem6
'
Me.MenuItem6.Index = 5
Me.MenuItem6.Text = "Tool"
'
'MenuItem7
'
Me.MenuItem7.Index = 6
Me.MenuItem7.Text = "Debug"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(368, 198)
Me.Menu = Me.MainMenu1
End Sub
Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click
OpenFileDialog1.ShowDialog()
End Sub
Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click
SaveFileDialog1.ShowDialog()
End Sub
End Class
|