I am new to this forum and new to Visual Basic. I am currently taking a online class introduction to Visual Basic. The class im in is using Visual Basic 2010, I am having problems coding a button to add up 3 textboxes and placing the sum in my toalprice label. Basicly I have a "CalculatePriceButton" when clicked it should put a value in my "Totalpricelabel" of the thee textboxes. Any helpwould be appriciated thnx.. Here is the code I alread have.
ublic Class MainForum1
Private Property FontStyle1 As Drawing.Font
Private Property Italicfont As Drawing.Font
Private Property donutLabel1 As Object
Private Property baglesLabel1 As Integer
Private Sub MainForum1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Private Sub ExitButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitButton1.Click
Private Sub ColorButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorButton.Click
TotalPriceLabel2.BackColor = Color.Cyan
well, I hate to point out the obvious but the problem seems to be that there's no code in the click event of your CalpriceButton.
1) even though they maybe numbers, the text in a text box is still a string, so be careful about using their contents directly... you may not have numerical values
2) Big hint: decimal.tryparse
Sorry I should of been more clear in my original post. The reason there is no code it that I dont even know where to begin with coding the event for the calcprice button. I should of also clarified that I am the only student in this class and am having a hard time with the instructor getting back with me. The book I have doesnt mention "strings" or how to enter them.