progress percentage between two amounts ?

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.
3 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Hello,

Can someone help me with this piece :)

we have for example 2 amounts

first one will be 15.000.00
second one will be 750.00

how can we get the percentage to set with progressbar value? to fill up the bar
to see how far we get with the payment

when offcource payed everything we must get 100%
so the progressbar will be full :D

Thanks
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
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Quickly coded, hope this helps:
Code: Select all
Dim SetAmount = "15.000.00"
        Dim CurrentAmount = "750.00"
        ProgressBar1.Value = (100 * CurrentAmount.Replace("."c, "")) / SetAmount.Replace("."c, "")
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

:lover; :lover; :lover;
Awesome Codenstuff

Thanks ;)
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
3 posts Page 1 of 1
Return to “Coding Help & Support”