Decimal's in a Label.

tlkerns

Member
Joined
Jun 3, 2004
Messages
19
Programming Experience
3-5

Michaelk

Well-known member
Joined
Jun 3, 2004
Messages
58
Location
Australia
Programming Experience
3-5
What i've got is this:

VB.NET:
 [size=2]

[size=2]maths.Text = (GetWMIDetails("win32_computersystem", "totalphysicalmemory") / 1048576)

txtRAM.Text = maths.Text + " MBytes"

[/size][/size]


Maths.Text is a Textbox that performs the division.
txtRAM.Text is a label that i want to display the final results.

But at the moment it displays a number like this 511.242522225, can i remove the decimals to make it just 511?
 
Top Bottom