Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'在窗口加载时初始化应用程序
InitializeApplication()
End Sub
Private Sub InitializeApplication()
'在此处编写初始化应用程序的代码
'添加学生管理界面
Dim studentForm As New StudentForm()
studentForm.MdiParent = Me
studentForm.Show()
End Sub
End Class
Public Class StudentForm
Inherits Form
Private Sub StudentForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'在窗口加载时初始化学生管理界面
InitializeStudentForm()
End Sub
Private Sub InitializeStudentForm()
'在此处编写初始化学生管理界面的代码
'添加学生列表
Dim studentList As New ListView()
studentList.Dock = DockStyle.Fill
Me.Controls.Add(studentList)
'添加学生数据
Dim student1 As New ListViewItem({"001", "张三", "男", "1999-01-01"})
studentList.Items.Add(student1)
Dim student2 As New ListViewItem({"002", "李四", "女", "1998-02-02"})
studentList.Items.Add(student2)
Dim student3 As New ListViewItem({"003", "王五", "男", "1997-03-03"})
studentList.Items.Add(student3)
End Sub
End Class