第二题vb编程考试求答案 50
1个回答
展开全部
Dim L1Aihao As String
Dim L1ind As Integer
Dim L2Aihao As String
Dim L2ind As Integer
Private Sub Command1_Click()
If List1.Text <> "" Then
List2.AddItem L1Aihao
List1.RemoveItem (L1ind)
End If
End Sub
Private Sub Command2_Click()
n = List1.ListCount - 1
For i = 0 To n
List2.AddItem List1.List(i)
Next i
For i = n To 0 Step -1
List1.RemoveItem (i)
Next i
End Sub
Private Sub Command3_Click()
If List2.Text <> "" Then
List1.AddItem L2Aihao
List2.RemoveItem (L2ind)
End If
End Sub
Private Sub Command4_Click()
m = List2.ListCount - 1
For i = 0 To m
List1.AddItem List2.List(i)
Next i
For i = m To 0 Step -1
List2.RemoveItem (i)
Next i
End Sub
Private Sub Form_Load()
List1.Clear
List1.AddItem "弄"
List1.AddItem "礶礶"
List1.AddItem "佰簈"
List1.AddItem "铬籖"
List1.AddItem "笴"
List1.AddItem "猭"
List1.AddItem "囱"
End Sub
Private Sub List1_Click()
L1ind = List1.ListIndex
L1Aihao = List1.Text
End Sub
Private Sub List2_Click()
L2ind = List2.ListIndex
L2Aihao = List2.Text
End Sub
Dim L1ind As Integer
Dim L2Aihao As String
Dim L2ind As Integer
Private Sub Command1_Click()
If List1.Text <> "" Then
List2.AddItem L1Aihao
List1.RemoveItem (L1ind)
End If
End Sub
Private Sub Command2_Click()
n = List1.ListCount - 1
For i = 0 To n
List2.AddItem List1.List(i)
Next i
For i = n To 0 Step -1
List1.RemoveItem (i)
Next i
End Sub
Private Sub Command3_Click()
If List2.Text <> "" Then
List1.AddItem L2Aihao
List2.RemoveItem (L2ind)
End If
End Sub
Private Sub Command4_Click()
m = List2.ListCount - 1
For i = 0 To m
List1.AddItem List2.List(i)
Next i
For i = m To 0 Step -1
List2.RemoveItem (i)
Next i
End Sub
Private Sub Form_Load()
List1.Clear
List1.AddItem "弄"
List1.AddItem "礶礶"
List1.AddItem "佰簈"
List1.AddItem "铬籖"
List1.AddItem "笴"
List1.AddItem "猭"
List1.AddItem "囱"
End Sub
Private Sub List1_Click()
L1ind = List1.ListIndex
L1Aihao = List1.Text
End Sub
Private Sub List2_Click()
L2ind = List2.ListIndex
L2Aihao = List2.Text
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询