Help

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.
10 posts Page 1 of 1
Contributors
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Help
muttley1968
Okay well i need to know a way with code to work out for example
i have a room that is 5m
i need a program to do
5m = 500cm3

i want to do this as in minecraft me and my freind have started buildling life sized houses and we know on minecraft block is 1cubic meter soo we want to make a program that converts real life messurements into blocks so we can build a life size version of our local town
User avatar
Skillful
Skillful Coders
Skillful Coders
Posts: 969
Joined: Tue Nov 16, 2010 10:07 am

Re: Help
Skillful
There is no straight conversion for metres to cubic centimeters as fast as my knowledge goes. You would first need to convert the metres into cubic metres first and then convert it into cubic centimeters. I'll write up some code for you when I get home, I'm on mobile currently.
Instead of LOL use this -
LSIBMHBIWFETALOL

Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: Help
MrAksel
1x1x1cm = 1cubic cm
10x10x10cm= 1000cubic cm
100x100x100cm = 1x1x1m = 1000000cubic cm
Code: Select all
'''
'''<summary>Converts a specified amount of cubic meters into cubic centimeters.</summary>
'''
Private Function GetCubicCM(ByVal CubicMeters As Integer) As Integer
   Return CubicMeters * 1000000
End Function
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Skillful
Skillful Coders
Skillful Coders
Posts: 969
Joined: Tue Nov 16, 2010 10:07 am

Re: Help
Skillful
MrAksel to the rescue lol :lol:
Instead of LOL use this -
LSIBMHBIWFETALOL

Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Help
comathi
MrAksel wrote:
1x1x1cm = 1cubic cm
10x10x10cm= 1000cubic cm
100x100x100cm = 1x1x1m = 1000000cubic cm
Code: Select all
'''
'''<summary>Converts a specified amount of cubic meters into cubic centimeters.</summary>
'''
Private Function GetCubicCM(ByVal CubicMeters As Integer) As Integer
   Return CubicMeters * 1000000
End Function
Wow! I never thought something I learned in math class would actually be this useful code wise :lol:

Hey, if you also need to convert it to Liters, just PM me :lol:
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Help
Filip
1 dm3 = 1 liter
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: Help
muttley1968
okayi sort of see how that is working but i need to know how to make it soo you have 1 textbox with say 15cm in it then it converts that into say 150 minecraft block each block is 1cm3 we know this soo how would i make it work this out could you just do for example
textbox.text +,*100000 but that wouldnt work i dont think and Also would any like ot help me i hope to make this like the minecraft version of prodesktop
User avatar
Usman55
VIP - Site Partner
VIP - Site Partner
Posts: 2821
Joined: Thu Dec 24, 2009 7:52 pm

Re: Help
Usman55
To get the cube of a value, you can use this "^ 3". I remember using it in my old calculator application but in my case I used this method to get the square of the value.

I don't know if I understood your question but if you need further explanation, feel free to ask.
Image
User avatar
muttley1968
Hardcore Programmer
Hardcore Programmer
Posts: 622
Joined: Thu Jun 17, 2010 11:54 pm

Re: Help
muttley1968
WOW i need to learn to explain my self beter right i want to make it some someone puts in a messurements such as 5m and then my program converts that and says 500mcb minecraft blocks
is that possible or will i need to invent something to do it
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: Help
MrAksel
Uhm, can't you just use
Code: Select all
Dim Blocks As Integer = TextBox1.Text * 100
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
10 posts Page 1 of 1
Return to “Coding Help & Support”