what you think? something wrong? here is my source code: Option Strict On Public Class Form1 Inherits System.Windows.Forms.Form Const InchesPerMile As Integer = 63360 Const InchesPerYard As Integer = 36 Const InchesPerFeet As Integer = 12 Const Converter As Double = 39.37 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub btnConvertEnglishtoMetric_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConvertEnglishtoMetric.Click Dim dblMiles As Double Dim dblYards As Double Dim dblFeet As Double Dim dblInches As Double Dim dblKilometers As Double Dim dblMeters As Double Dim dblTotalInches As Double Dim dblRemainingMeters As Double Dim dblTotalMeters As Double dblMiles = Convert.ToDouble(nudMiles.Value) dblYards = Convert.ToDouble(nudYards.Value) dblFeet = Convert.ToDouble(nudFeet.Value) dblInches = Convert.ToDouble(nudInches.Value) dblMeters = Convert.ToDouble(txtMeters.Text) dblTotalInches = InchesPerMile * dblMiles + InchesPerYard * dblYards + InchesPerFeet * dblFeet + dblInches dblTotalMeters = dblTotalInches / Converter txtKilometers.Text = Convert.ToString(Convert.ToInt32(dblTotalMeters / 1000)) dblKilometers = Convert.ToInt32(dblTotalMeters / 1000) dblRemainingMeters = (dblTotalMeters - (1000 * dblKilometers)) txtMeters.Text = Convert.ToString(Convert.ToInt32(dblRemainingMeters)) dblRemainingMeters = Convert.ToDouble(dblRemainingMeters - Convert.ToInt32(dblRemainingMeters)) txtCentimeters.Text = Convert.ToString(dblRemainingMeters * 100) End Sub
Date: Wed, 26 Nov 2008 11:12:44 -0500From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [DotNetDevelopment] Re: need help!!!!Can you post your source? On Wed, Nov 26, 2008 at 10:41 AM, Shannon Cummings <[EMAIL PROTECTED]> wrote: I have something went wrong designer and source code. Its not working. Its been stuck. I don't think so hours, minutes and seconds. I don't know. Date: Tue, 25 Nov 2008 23:40:21 -0500From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: [DotNetDevelopment] Re: need help!!!! Where are you getting stuck? Pick up a physics or math book to verify length conversions. I'd recommend converting the English lengths to inches. Then make that value metric. It might (or may not) help to think of time and how hours, minutes, and seconds can be converted into one another. The thought process is analogous. On Tue, Nov 25, 2008 at 5:59 PM, Shannon <[EMAIL PROTECTED]> wrote: I am taking a Visual Basic .NET in class this semester and up tothis point everything has seem to be going smoothly! Yesterday, Ireceived my assignment, I read through the chapter and thought Icouldhandle this assignment. Well I was wrong and cannot understand it atall....This particular assignment is a freebie....do it so I can getthe real assignment....don't even have to hand it in but if I dontunderstand it my next assignment really will not make any sense atall.So I need some help!! I've done the simple part of creating theform....no code though....I do not understand theconstant...vaiables....so if anyone could write the code and send itto me in a notepad or word fileEnglish to Metric ConversionDesign and develop a project to convert an English measurement inmiles, yards, feet, and inches to a metric measurement in kilometers,meters, and centimeters. Use the following formula to change theEnglish measurement to inches:Total Inches = 63,360 x Miles + 36 X Yards + 12 X Feet + InchesUse the following formula to determine the equivalent meters:Meters = Total Inches / 39.37Declare constants for all numeric values in the two formulas above.Thevariable used to represent the number of meters and the numericconstant 39.37 must be declared as the data type Double. Theconstantsand data types in the first formula should be declared as integers.Convert the Total Inches in the second formula to a Double data typebefore using it in the calculation. Set Option Strict to On in yourcode.(Hint: After the number of meters has been determined, the maximumnumber of kilometers can be computed from: Kilometers = Meters\1,000.Next, the remaining meters can be determined from: Remaining Meters =Meters -1,000 * Kilometers. The number of integer meters in RemainingMeters then can be determined from: Integer Meters =Convert.ToInt32(Remaining Meters). Continue with the same techniquetocompute the number of centimeters.)Use the following test data to test your program: 2 miles, 5 yards, 2feet, and 7 inches. The result should be 3 kilometers, 224 meters,and5.38 centimeters.-- Charles A. [EMAIL PROTECTED] of Arts - Computer Science New York UniversityRegistered Microsoft PartnerNew York City, NY Windows Live Hotmail now works up to 70% faster. Sign up today.-- _______________________________Take care,PaulIt is not we non-interventionists who are isolationists. The real isolationists are those who impose sanctions and embargos on countries and peoples across the globe and who choose to use force overseas to promote democracy. A counterproductive approach that actually leads the U.S. to be more resented and more isolated in the world. Dr. Ron Paulwww.RonPaul2008.com _________________________________________________________________ Proud to be a PC? Show the world. Download the “I’m a PC” Messenger themepack now. hthttp://clk.atdmt.com/MRT/go/119642558/direct/01/
