牛排多選單程式碼


Private Sub B1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles B1.Click


        Dim c1, c2, c3


        Dim s1, s2, s3


        If Cb1.Checked Then

 



            c1 = 190


            s1 = Cb1.Text


        Else

 



            c1 = 0


            s1 = ""


        End If


        If Cb2.Checked Then


            c2 = 180


            s2 = Cb2.Text


        Else


            c2 = 0


            s2 = ""


        End If


        If Cb3.Checked Then


            c3 = 150


            s3 = Cb3.Text


        Else


            c3 = 0


            s3 = ""


        End If


        L1.Text = "你的選擇:" & s1 & s2 & s3 & " 應付" & (c1 + c2 + c3) & ""


    End Sub


 

 



 


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

 



 


        Cb1.Checked = False


        Cb2.Checked = False

 



        Cb3.Checked = False


    End Sub


End Class


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 allnewtim 的頭像
    allnewtim

    Timmilk

    allnewtim 發表在 痞客邦 留言(0) 人氣()