第二题vb编程考试求答案 50

 我来答
零點情人
2015-12-26 · 超过34用户采纳过TA的回答
知道答主
回答量:116
采纳率:25%
帮助的人:27.7万
展开全部
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
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式