你如何在Visual Basic中创建一种on click事件(我认为这就是它所谓的)?

时间:2015-04-23 23:57:07

标签: winforms visual-studio

所以我有一个按钮(让我们称之为苹果),当点击时我想添加一个苹果以显示在列表框中。如果再次点击它会添加另一个,依此类推。然后我可以在列表框上统一订单。

Public Class frmCafe

Const price_cheese_burger As Double = 4.95
Const price_blt_sandwich As Double = 4.0
Const price_ht_sandwich As Double = 3.5

Dim total As Double
Private Sub btnCheeseB_Click(sender As Object, e As EventArgs) Handles btnCheeseB.Click

    'here when i click cheeseburger, id like it to +1 to the list order (lstChosenProducts)
    'just struggling to figure it out

End Sub

现在不要,如果这有帮助,或者它有多大意义,但任何输入都会很棒,欢呼!

0 个答案:

没有答案