我有以下.net代码,在执行 InitializeComponent()的过程中,出现类似“ InvalidArgument =值'1'的值对'Index'无效”的异常。 >
公开课表格1 继承System.Windows.Forms.Form
Dim path As String
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
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
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
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 MenuItem16 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem17 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem18 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem19 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem20 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem21 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem22 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem23 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem24 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem25 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem27 As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.MainMenu1 = New System.Windows.Forms.MainMenu(Me.components)
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem6 = New System.Windows.Forms.MenuItem
Me.MenuItem7 = New System.Windows.Forms.MenuItem
Me.MenuItem8 = New System.Windows.Forms.MenuItem
Me.MenuItem9 = New System.Windows.Forms.MenuItem
Me.MenuItem14 = New System.Windows.Forms.MenuItem
Me.MenuItem15 = New System.Windows.Forms.MenuItem
Me.MenuItem18 = New System.Windows.Forms.MenuItem
Me.MenuItem24 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = 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.MenuItem3 = New System.Windows.Forms.MenuItem
Me.MenuItem16 = New System.Windows.Forms.MenuItem
Me.MenuItem17 = New System.Windows.Forms.MenuItem
Me.MenuItem4 = New System.Windows.Forms.MenuItem
Me.MenuItem13 = New System.Windows.Forms.MenuItem
Me.MenuItem5 = New System.Windows.Forms.MenuItem
Me.MenuItem19 = New System.Windows.Forms.MenuItem
Me.MenuItem20 = New System.Windows.Forms.MenuItem
Me.MenuItem21 = New System.Windows.Forms.MenuItem
Me.MenuItem22 = New System.Windows.Forms.MenuItem
Me.MenuItem23 = New System.Windows.Forms.MenuItem
Me.MenuItem25 = New System.Windows.Forms.MenuItem
Me.MenuItem27 = New System.Windows.Forms.MenuItem
Me.SuspendLayout()
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2, Me.MenuItem3, Me.MenuItem4, Me.MenuItem5, Me.MenuItem25})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem6, Me.MenuItem7, Me.MenuItem8, Me.MenuItem9, Me.MenuItem14, Me.MenuItem15, Me.MenuItem18, Me.MenuItem24})
Me.MenuItem1.Text = "&Master"
'
'MenuItem6
'
Me.MenuItem6.Index = 0
Me.MenuItem6.Text = "&Department"
'
'MenuItem7
'
Me.MenuItem7.Index = 1
Me.MenuItem7.Text = "&Employee"
'
'MenuItem8
'
Me.MenuItem8.Index = 2
Me.MenuItem8.Text = "&Section"
'
'MenuItem9
'
Me.MenuItem9.Index = 3
Me.MenuItem9.Text = "&Vacancy"
'
'MenuItem14
'
Me.MenuItem14.Index = 4
Me.MenuItem14.Text = "&Designation"
'
'MenuItem15
'
Me.MenuItem15.Index = 5
Me.MenuItem15.Text = "&Vacancy Fill Details"
'
'MenuItem18
'
Me.MenuItem18.Index = 6
Me.MenuItem18.Text = "&JobRotation"
'
'MenuItem24
'
Me.MenuItem24.Index = 7
Me.MenuItem24.Text = "&DeptInterDependencies"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem10, Me.MenuItem11, Me.MenuItem12})
Me.MenuItem2.Text = "&Org.Detail"
'
'MenuItem10
'
Me.MenuItem10.Index = 0
Me.MenuItem10.Text = "&Org.Struct.Details"
'
'MenuItem11
'
Me.MenuItem11.Index = 1
Me.MenuItem11.Text = "&EmployeeStructure"
'
'MenuItem12
'
Me.MenuItem12.Index = 2
Me.MenuItem12.Text = ""
'
'MenuItem3
'
Me.MenuItem3.Index = 2
Me.MenuItem3.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem16, Me.MenuItem17})
Me.MenuItem3.Text = "&Weightage"
'
'MenuItem16
'
Me.MenuItem16.Index = 0
Me.MenuItem16.Text = "&DesignationLayers"
'
'MenuItem17
'
Me.MenuItem17.Index = 1
Me.MenuItem17.Text = "&DesignatiDeptWeightage"
'
'MenuItem4
'
Me.MenuItem4.Index = 3
Me.MenuItem4.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem13})
Me.MenuItem4.Text = "&Authentication"
'
'MenuItem13
'
Me.MenuItem13.Index = 0
Me.MenuItem13.Text = "&Users"
'
'MenuItem5
'
Me.MenuItem5.Index = 4
Me.MenuItem5.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem19, Me.MenuItem20, Me.MenuItem21, Me.MenuItem22, Me.MenuItem23})
Me.MenuItem5.Text = "&Reports"
'
'MenuItem19
'
Me.MenuItem19.Index = 0
Me.MenuItem19.Text = "&EmployeeInfo"
'
'MenuItem20
'
Me.MenuItem20.Index = 1
Me.MenuItem20.Text = "&UserInfo"
'
'MenuItem21
'
Me.MenuItem21.Index = 2
Me.MenuItem21.Text = "&DepartmentsInfo"
'
'MenuItem22
'
Me.MenuItem22.Index = 3
Me.MenuItem22.Text = "&SectionsInfo"
'
'MenuItem23
'
Me.MenuItem23.Index = 4
Me.MenuItem23.Text = "&SectionEmployeeInfo"
'
'MenuItem25
'
Me.MenuItem25.Index = 5
Me.MenuItem25.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem27})
Me.MenuItem25.Text = "&Close"
'
'MenuItem27
'
Me.MenuItem27.Index = 1
Me.MenuItem27.Text = "Exit"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(768, 273)
Me.IsMdiContainer = True
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "IMPRO-Main Page"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.ResumeLayout(False)
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Me.Text = Space(10) & "User-"
End Sub
Private Sub MenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem6.Click
Dim dfrm As FrmDept
dfrm = New FrmDept()
dfrm.MdiParent = Me
dfrm.Show()
End Sub
Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem8.Click
Dim sfrm As New Frmsections()
sfrm.MdiParent = Me
sfrm.Show()
End Sub
Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click
Dim efrm As New FrmEmployee()
efrm.MdiParent = Me
efrm.Show()
End Sub
Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click
Dim vm As New FrmVacancyMast()
vm.MdiParent = Me
vm.Show()
End Sub
Private Sub MenuItem14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem14.Click
Dim df As New FrmDesig()
df.MdiParent = Me
df.Show()
End Sub
Private Sub MenuItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem15.Click
Dim vf As New FrmVacancyFill()
vf.MdiParent = Me
vf.Show()
End Sub
Private Sub MenuItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem13.Click
Dim u As New FrmUserCreation()
u.MdiParent = Me
u.Show()
End Sub
Private Sub MenuItem16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem16.Click
Dim dl As New FrmPosDesigw()
dl.MdiParent = Me
dl.Show()
End Sub
Private Sub MenuItem17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem17.Click
Dim dd As New FrmdeptDesigw()
dd.MdiParent = Me
dd.Show()
End Sub
Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click
Dim ed As New FrmDesigtructure()
ed.MdiParent = Me
ed.Show()
End Sub
Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem18.Click
Dim j As New FrmJobRotation()
j.MdiParent = Me
j.Show()
End Sub
Private Sub MenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem10.Click
Dim fo As New FrmOrg()
fo.MdiParent = Me
fo.Show()
End Sub
Private Sub MenuItem19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem19.Click
Call configreport("rempinfo.rpt", Me)
'path = Application.StartupPath & "\rempinfo.rpt"
'Dim frm As New view(path)
'frm.MdiParent = Me.MdiParent
'frm.Show()
'Dim re As New RptEmp
're.MdiParent = Me
're.Show()
End Sub
Private Sub MenuItem20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem20.Click
Call configreport("ruserinfo.rpt", Me)
'path = Application.StartupPath & "\ruserinfo.rpt"
'Dim frm As New view(path)
'frm.MdiParent = Me.MdiParent
'frm.Show()
'Dim u As New RptUser
'u.MdiParent = Me
'u.Show()
End Sub
Private Sub MenuItem21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem21.Click
Call configreport("rdeptinfo.rpt", Me)
'path = Application.StartupPath & "\rdeptinfo.rpt"
'Dim frm As New view(path)
'frm.MdiParent = Me.MdiParent
'frm.Show()
'Dim d As New RptDept
'd.MdiParent = Me
'd.Show()
End Sub
Private Sub MenuItem22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem22.Click
Call configreport("RSECTIONINFO.rpt", Me)
'path = Application.StartupPath & "\rsections.rpt"
'Dim frm As New view(path)
'frm.MdiParent = Me.MdiParent
'frm.Show()
' Dim s As New RptSect
' s.MdiParent = Me
' s.Show()
End Sub
Private Sub MenuItem24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem24.Click
Dim dd As New FrmInterDep
dd.MdiParent = Me
dd.Show()
End Sub
Private Sub MenuItem23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem23.Click
Call configreport("rptsecinvemployee.rpt", Me)
'path = Application.StartupPath & "\rptsecinvemployee.rpt"
'Dim frm As New view(path)
'frm.MdiParent = Me.MdiParent
'frm.Show()
' Dim r As New RptInvEmp
' r.MdiParent = Me
' r.Show()
End Sub
Private Sub MenuItem26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
c.Invoke()
End Sub
Private Sub MenuItem27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem27.Click
End
End Sub
结束班级