Help with linking codes to program...
Help with linking codes to program...
Help with linking codes to program...
Help with linking codes to program...
Help with linking codes to program...
Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program...
Help with linking codes to program... Help with linking codes to program...
Help with linking codes to program...
Go Back  Xtreme Visual Basic Talk > > > Help with linking codes to program...


Reply
 
Thread Tools Display Modes
  #1  
Old 01-04-2010, 12:19 PM
Madsnipe Madsnipe is offline
Newcomer
 
Join Date: Jan 2010
Posts: 14
Default Help with linking codes to program...


Hey, I was wondering if someone can tell me what button, textboxed, listbox, and labels the code goes to. This is for my class and I need to get it working by tomorrow. I know the code is correct but the program is not working and gives me the error "Input String was not in a correct format" Here is the code:

Public Class Form1
Dim numofSlice As Integer
Dim numofFires As Integer
Dim numofDrinks As Integer

Dim Slicefee As Double = 1.75
Dim FiresFee As Double = 2.0
Dim DrinksFee As Double = 1.25
Dim SubTotal As Double = 0.0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
Private Sub ReadItemQuantity()
Try
numofSlice = Convert.ToInt32(txtSlice.Text)
numofFires = Convert.ToInt32(txtFries.Text)
numofDrinks = Convert.ToInt32(txtDrinks.Text)

Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

End Sub
Private Function GetGrandTotal() As Double
SubTotal = 0.0
SubTotal += numofSlice * Slicefee
SubTotal += numofFires * FiresFee
SubTotal += numofDrinks * DrinksFee
Return SubTotal
End Function
Private Sub btBill_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btBill.Click
ReadItemQuantity()

DisplayBill()

End Sub

Private Sub DisplayBill()

lblSliceTotal.Text = Convert.ToString(numofSlice * Slicefee)

lblFriesTotal.Text = Convert.ToString(numofFires * FiresFee)

lblDrinksTotal.Text = Convert.ToString(numofDrinks * DrinksFee)
lblSubTotal.Text = GetGrandTotal().ToString()
Me.Height = 354

End Sub
End Class


Thank you in advance for any help!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Help with linking codes to program...
Help with linking codes to program...
Help with linking codes to program... Help with linking codes to program...
Help with linking codes to program...
Help with linking codes to program...
Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program... Help with linking codes to program...
Help with linking codes to program...
Help with linking codes to program...
 
Help with linking codes to program...
Help with linking codes to program...
 
-->