Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Results not showing in Decimal Form Help Pls


Results not showing in Decimal Form Help Pls

Author
Message
deafgal
deafgal
Forum God
Forum God (363 reputation)Forum God (363 reputation)Forum God (363 reputation)Forum God (363 reputation)Forum God (363 reputation)Forum God (363 reputation)Forum God (363 reputation)Forum God (363 reputation)Forum God (363 reputation)

Group: Forum Members
Posts: 1, Visits: 6

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Total_CMADataSet.Table1' table. You can move, or remove it, as needed.
Me.Table1TableAdapter.Fill(Me.Total_CMADataSet.Table1)
End Sub
Private Sub Strands_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Strands.TextChanged
Dim area As Decimal = CDec(ListBox1.SelectedValue)
Dim strand As Decimal
Label3.BackColor = Color.Blue
Label3.ForeColor = Color.AntiqueWhite
Label3.BorderStyle = BorderStyle.Fixed3D
If Decimal.TryParse(Strands.Text, strand) Then
strand *= CDec(area)
Label3.Text = strand.ToString
End If
End Sub
End Class

 
The end result is baffling me here are 2 examples when I debug

Mine: 640.1 * 49 = 31364.9
Debugger: 640.1 * 49 = 31360 ( not right needs to show the correct decimal )

Mine: .775 * 3 = 2.325
Debugger: .775 * 3 = 2.325 ( shows it perfectly???)


Im still a Noob, go gentle on me :-)
Edited
10/21/2009 by deafgal
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search