Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VB2008-Decimal Places

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Orbit
Advanced Cheater
Reputation: 0

Joined: 09 Dec 2007
Posts: 74

PostPosted: Tue Jul 08, 2008 8:52 am    Post subject: VB2008-Decimal Places Reply with quote

I have a label1 and it has a long decimal number

label1.text=1/3

it shows .3333333333333... but i want it to show

.33 or .34

So is there a way to make it to 2 decimal places?
Back to top
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Tue Jul 08, 2008 9:15 am    Post subject: Reply with quote

ok, stop making so many threads

i googled vb.net rounding number and got this:
[url]
http://www.vb-helper.com/howto_net_round_to_specified_digits.html[/url]

how hard is it

_________________
Back to top
View user's profile Send private message
Orbit
Advanced Cheater
Reputation: 0

Joined: 09 Dec 2007
Posts: 74

PostPosted: Tue Jul 08, 2008 11:00 am    Post subject: Reply with quote

Snootae wrote:
ok, stop making so many threads

i googled vb.net rounding number and got this:
[url]
http://www.vb-helper.com/howto_net_round_to_specified_digits.html[/url]

how hard is it


I have question so i am making threads
any problem? Confused
and the place you linked me isnt my answer
Back to top
View user's profile Send private message
Typhoon808
Expert Cheater
Reputation: 0

Joined: 27 Mar 2008
Posts: 175
Location: Wales

PostPosted: Tue Jul 08, 2008 11:50 am    Post subject: Reply with quote

Use the FormatNumber function:
Code:

Dim original As String = 1 / 3
Dim output As String = FormatNumber(original, 2, , , TriState.False)
'Most of the arguments in FormatNumber are optional.  Check the Intellisense for info.
Label1.Text = output
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites