vb.net 2013 - double?
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts
Page 1 of 1
hello,
does anyone know how i can convert a double without a negative ()
it seems i get (£50.00) - this is a negative value
but i like to have it as -£50.00
i use:
does anyone know how i can convert a double without a negative ()
it seems i get (£50.00) - this is a negative value
but i like to have it as -£50.00
i use:
Code: Select all
cDAL:
Dim l As Double
l = cDAL.VarToDbl(Label6.Text + Amount1) 'amount1 is a double
lblrunning.Text = Format(l, "c")
Code: Select all
thanksPublic Shared Function VarToDbl(ByVal o As Object) As Decimal
Try
Return Decimal.Parse(o.ToString)
Catch
Return 0
End Try
End Function
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
I don't know if I completely understood what you meant or not.
Code: Select all
If the number is negative it will still display as -something instead of somethingDim doub As Double = 10.0R
Label1.Text = doub + TextBox1.Text
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
hello #smashapps
do you know a other way as well?
because it seems i can't use a R after my double values
because
amount += amount & "R" don't work
if i remove this part then it works fine but then we don't get the £ before the value
but then if value is - then it shows like
(£50.00) instead of -£50.00
do you know a other way as well?
because it seems i can't use a R after my double values
because
amount += amount & "R" don't work
if i remove this part then it works fine but then we don't get the £ before the value
Code: Select all
this part shows the value with £lblrunning.Text = Format(l, "c")
but then if value is - then it shows like
(£50.00) instead of -£50.00
Code: Select all
lblrunning.Text = Format(l, "c")
Last edited by Dummy1912 on Wed May 28, 2014 3:47 pm, edited 1 time in total.
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
hello #XTechVB
that contains just a amount like for example 50.00
that contains just a amount like for example 50.00
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023