|
![]() |
Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming | |
New to VB... Need help with homework assignment
|
||
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | ||||||||||||
|
Windows Wrangler
![]() |
Hey guys i'm needing some help. I can do the graphical part of this bu after that i am totally lost. I have searched many VB sites for snippets and help on this but cannot find out how to do it.
I'm basically making a small program that converts english to metric for a company. After loosing $125 million dollars in the Mars orbiter crash, NASA hired you to develop an application that will allow them to convert distances from English to metric units. * First, install VB.NET. * Create a new solution named YourName_Unit01. * The form will contain a minimum of two text box control instances. * One text box will be used to input the value to be converted, and the second text box will be used to display the results from the calculation. * Text boxes, when used to display results, must be read-only. * Write the code to perform the calculations required. Make the Calculate button the Accept button. * Create a Clear button that will clear both text boxes. * Create an Exit button. * Use labels to identify each text box used in the form. * Make sure the application accepts and calculates decimal values. All help is greatly appreciated. Thanks
__________________
OC it till it burns!!! LOL
|
||||||||||||
|
|
|
|
|
#2 (permalink) | ||||||||||||
|
Overclocker
![]() |
You should google how to convert english to metric before you try to put it in code. ;p
|
||||||||||||
|
|
|
|
|
#3 (permalink) | ||||||||||||
|
Windows Wrangler
![]() |
1 in = 2.54 cm
1 ft = 30.48 cm = 0.305 m 1 yd = 0.914 m 1 mi = 1.609 km
__________________
OC it till it burns!!! LOL
|
||||||||||||
|
|
|
|
|
#4 (permalink) | |||||||||||||
|
S my D IW!
![]() |
By "English to metric units" do they mean...
One inch = 2.55cm One meter = etc. ? ~B~
__________________
|
|||||||||||||
|
|
|
|
#5 (permalink) | ||||||||||||
|
Overclocker
![]() |
It may be bad programming practices, but i always just use the if code if i cannot figure something out lol
Have the form and title state its converting. Have text box 1 list amount to convert and in code onclick ( the calculate button ) if value in text1 = true enter the converting code and out put it to the second. else use a msgbox and ask to enter a value, doesnt seem that bad, however its been a year or two since i sat in a classroom.
Last edited by Arakasi : 05-24-09 at 07:27 PM |
||||||||||||
|
|
|
|
|
#6 (permalink) | ||||||||||||
|
Windows Wrangler
![]() |
so as far as the teachers instructions above would it be easier to just use a listbox or multiple text boxes and programming for each?
__________________
OC it till it burns!!! LOL
|
||||||||||||
|
|
|
|
|
#7 (permalink) | ||||||||||||
|
Overclocker
![]() |
I would go with multiple textboxes
Instructions: One text box will be used to input the value to be converted, and the second text box will be used to display the results from the calculation. * Text boxes, when used to display results, must be read-only. <<<
|
||||||||||||
|
|
|
|
|
#8 (permalink) | ||||||||||||
|
Windows Wrangler
![]() |
As far as the first one goes
1 in = 2.54 cm The code should be something like this If Textbox1.txt = true then Textbox1.txt * 2.54 = Textbox2.txt
__________________
OC it till it burns!!! LOL
|
||||||||||||
|
|
|
|
|
#9 (permalink) | ||||||||||||
|
Windows Wrangler
![]() |
k guys i'm doing this wrong. any ideas what im doing wrong?
__________________
OC it till it burns!!! LOL
|
||||||||||||
|
|
|
|
|
#10 (permalink) | ||||||||||||||
|
4.0ghz
![]() |
You need to be more descriptive than, "I'm doing it wrong"
~Gooda~
__________________
Start folding HERE! Quote:
|
||||||||||||||
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|