VB:设计如图程序,实现“饭店点菜”,代码写下面
1个回答
展开全部
根据你的题目要求写的代码,你自己把控件都设置好,直接运行就可以了,代码我都测试过,没问题的。
Private Sub Command1_Click()
Me.List2.AddItem List1.Text
Me.List1.RemoveItem (Me.List1.ListIndex)
End Sub
Private Sub Form_Load()
With Me.List1
.AddItem "宫保鸡丁"
.AddItem "红烧带鱼"
.AddItem "红烧牛肉"
.AddItem "麻婆豆腐"
.AddItem "青菜蘑菇"
.AddItem "香菇油菜"
.AddItem "香辣鸡翅"
.AddItem "鱼香肉丝"
.AddItem "过油肉"
.AddItem "雪盖火山"
.AddItem "蚂蚁上树"
End With
End Sub
Private Sub Command1_Click()
Me.List2.AddItem List1.Text
Me.List1.RemoveItem (Me.List1.ListIndex)
End Sub
Private Sub Form_Load()
With Me.List1
.AddItem "宫保鸡丁"
.AddItem "红烧带鱼"
.AddItem "红烧牛肉"
.AddItem "麻婆豆腐"
.AddItem "青菜蘑菇"
.AddItem "香菇油菜"
.AddItem "香辣鸡翅"
.AddItem "鱼香肉丝"
.AddItem "过油肉"
.AddItem "雪盖火山"
.AddItem "蚂蚁上树"
End With
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询