Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If ListBox1.SelectedIndex = -1 Then
            MsgBox("你没有在所有开设课程中选取课程")
            Exit Sub
        End If
        ListBox2.Items.Add(ListBox1.Text)
        ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
    End Sub
End Class
