我用vb6.0软件设计一个功能为:有两个列表框,左右各一个,一个点击左边列表框里的选项选中,再点击确定
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ListBox1.SelectedItem <> "" Then
ListBox2.Items.Add(ListBox1.SelectedItem)
ListBox1.Items.Remove(ListBox1.SelectedItem)
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If ListBox2.SelectedItem <> "" Then
ListBox1.Items.Add(ListBox2.SelectedItem)
ListBox2.Items.Remove(ListBox2.SelectedItem)
End If
End Sub
End Class