订购食物清单 [英] Order food list
本文介绍了订购食物清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何计算列表框中的所有项目
how do i compute all of item in listbox
如果单选按钮1被选中,则将总计增加10 $
如果列表框,组合框和乘员组名称为空白,则会弹出错误,
if radiobutton1 is check add 10$ to total
if listbox, combobox, and crewname is blank pop up error,
我已经做了什么
what i already done
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("water")
ComboBox1.Items.Add("ice")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
MsgBox("Crew Name: " & i, 64)
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.SelectedItem = ("water") Then
ListBox1.Items.Add("water $1")
ElseIf ComboBox1.SelectedItem = ("ice") Then
ListBox1.Items.Add("ice $2")
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox1.Items.Clear()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
End class
请帮助
推荐答案
http://i.imgur.com/gH8aBAq.png
http://i.imgur.com/gH8aBAq.png
像这样
这篇关于订购食物清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文