VS 2010 Distance Calculator In VB 2010 Loop?
Nov 4, 2011
I can't get the loop to work. The calculator is suppose to show how far someone goes for each hour increment (i.e. if they punch in 3 hours, it should show a number for 1 hour, 2 hours and 3 hours; if they punch in 10 hours it should show a number for 1 hour, 2 hours, 3 hours....etc. up to ten hours, etc.) I can't get it to show anything except for the total number of hours traveled and total distance.
Private Sub DistanceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DistanceButton.Click
Dim speedIsValid As Boolean
[Code]....
View 1 Replies
ADVERTISEMENT
Nov 4, 2011
The calculator is suppose to show how far someone goes for each hour increment (i.e. if they punch in 3 hours, it should show a number for 1 hour, 2 hours and 3 hours; if they punch in 10 hours it should show a number for 1 hour, 2 hours, 3 hours....etc. up to ten hours, etc.) I can't get it to show anything except for the total number of hours traveled and total distance.
rivate Sub DistanceButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DistanceButton.Click
Dim speedIsValid As Boolean
[code].....
View 7 Replies
Nov 4, 2011
I can't get the loop to work.
View 1 Replies
Mar 1, 2010
I've to do this application whose purpose is :The application computes the number of miles traveled given the speed limit and the number of hours to be traveled in one day.Restrictions: The number of hours for one day of travel should not exceed 20 hours.
Public Class frmDistanceTraveled
Private Sub btnCalculateDistance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculateDistance.Click
[code].....
View 15 Replies
Oct 18, 2011
1. My input box does not prompt
2. Then a loop should be used to display in a list box the distance the vehicle has traveled for each hour of that time period.
[Code]...
View 5 Replies
Mar 5, 2011
Here is the code. The only problem I am having is getting the total miles to display. How do I get my listbox to show my total miles broken down to hour1 xx miles. I can get it to show the total miles per total hours driven.
Option Strict On
Public Class frmDistanceTraveled
Private Sub btnCalculateDistance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculateDistance.Click
' The btnCalculateDistance event hadler calculates the distance
' traveled
[Code] .....
View 1 Replies
Apr 24, 2010
I am attempting to write a speed/distance calculator using visual basic 2008 express edition. I have gotten the program to do most everything I need but am having some difficulties and have been trying to fix them for 2 or 3 days now without any success. Will somebody, anybody please tell me how to fix the problems.The calculator should display the distance traveled when the speed and time are entered. This is the only major requirement. However, It needs to have all info input via a list box with popup windows displayed for speed entry and then again for time entry. I would like a label outside of the list box to show "Total Distance Traveled" and I would like the list box to display the following information
[Code]...
View 3 Replies
Mar 31, 2012
I started learning vb 2010 over the internet for about an a week and got stuck on this assignment that I got from the internet
1.Add one textbox so the user can enter a distance measured in feet. Add labels as needed.
2.Add a button control which when clicked is converts the feet to meters (1 foot = 0.3048 meters), accepting floating point values and preserving them (no integer conversions) and display the output as shown next. 1 Points
3.Display the conversion result using a MessageBox (not msgbox) using this format: x feet is y meters, where x is the value entered and y is the result of the conversion to meters with up to 2 decimal places only. Then show an extra line of "Would you like to start another distance conversion?" and make the No button the default in the message popup and display the question icon.
4. If the user chooses Yes, cleanup the controls as in the Reset button. 0.5 Point
5.If the user clicks no, ask in another MessageBox if the user wants to quit.
6.If the user chooses to quit, close the window, otherwise no action is required.
View 5 Replies
Feb 20, 2011
I am using the following code to get distance between two propertys. The problem i am having is each Distance Calculation is being obliterated and I am only geting back the last Calculation instead of each calculation/distance
[Code]...
View 4 Replies
Jun 5, 2011
How to make this calculator:2 Texboxes In first textbox is writeble (where user will write the version) The second textbox is notwriteble ( there will show the result)In the first textbox to make calculation of version.If user writes for example: 1.03.11 In textbox2 to display the calculation: 22656 If the user writes for example other version:1.05.50 In textbox2 to display the calculation:22895and the same way if user writes 1.03.24 or other numbers auto to calculate the versions, and if user writes a bad text in tetbox2 to display error: For example In textbox1 user writes text: omg In textbox2 shows : Error
Only if user writes number like this: 1.03.11 or other number will calculate it else to shows error
View 16 Replies
Sep 8, 2011
VS 2010 : make a Rank Calculator?
View 2 Replies
Sep 25, 2011
This is one of my first forms so I'm sure there is quite a bit wrong with it. It works to a good degree but my issue is, Although I'm asking and checking for an int. If I put say 1.1 in a field it still lets it go. I'm sure I'm missing something very easy but I've been messing with it for hours.
Public Class frmStadiumSeatingCalculator
Private Sub frmStadiumSeatingCalculator_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[code].....
View 2 Replies
Mar 16, 2012
I'm looking for a definitive, standard (i.e. certified as being correct or tested reasonably thoroughly) for calculating the ISO week from a date, in Visual Basic (i.e. to run in a Visual Studio Express 2010 Visual Basic project). I found some routines that were Visual Basic for Applications oriented; reliant on Excel environment, some things not present in Visual Studio Express 2010 Visual Basic: [URL]
View 1 Replies
Sep 14, 2011
I am slowly learning to program in visual basic and just spent the past 5 hours trying to fix this but just cant.
View 8 Replies
Nov 29, 2010
I am making a calculator. I need a button that functions like a Backspace-button on a calculator. Erase the last inserted char, or what ever may work.
I use:
Button1
TextBox1
View 3 Replies
Nov 16, 2010
I just switched to VS 2010 for Windows phone 7 developement... I am trying to create a basic BMI calculator app...This is what I have now...
CODE:
However I have these errors which are as below
Quote:
CODE:
Quote:
CODE:
Did I forget to declare something? This does not happens when I am using the divide and multiply in VS 2008.
Error Screenshot as attached below...
View 2 Replies
Aug 26, 2011
I'm new in the programming area and I'm having trouble making a calculator. My question is: How do I make the calculator work using only the keyboard, without the need of mouse.
I tried this:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.KeyPreview = True
End Sub
Private Sub FlowLayoutPanel1_KeyDown(ByVal sender As Object, ByVal e
As System.Windows.Forms.KeyEventArgs) Handles RESULTADO.KeyDown
If e.KeyCode = Keys.NumPad0 Then
[Code] .....
It only works on the text box called Result. I want to know how do I make work in the whole Class, and if it is possible, to make it work on two different Classes without writing twice the same code.
View 6 Replies
Jan 3, 2011
I want to make a game statistics calculator. For this I choose to make a XML database with the base stats of the characters.
I've made a small XML file in the VS2010 project with 1 class stats and made a list to 10 levels (to lazy atm to write all 85).
the XML looks like this:
<BASIC_CHARACTER_STATS>
<Levels>
<level id="1">1</level>
[Code]....
On the Form1.vb I've to combo boxes, 1 to display class names and 1 for levels.
Also have some Labels to display i.e. the base_STR number. But after trying random stuff to get it linked and closed VB to restart again because it was messed up too much
View 1 Replies
Jun 30, 2011
I am making a calculator for a school project, I want to have it so it looks similar to windows calc ( with one button for each number & only one text box),My code has a few blank spots but so far it is :
Public Class calc
Private Sub Btn1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn1.Click
IOBox.Text = IOBox.Text + "1"
End Sub
[code].....
View 5 Replies
Mar 15, 2011
I am coding a simple calculator and I need the textbox to show the previous entries when I enter them. I hear the best way to do this is by Append Text? For example I click 3 Then + The textbox will show "3+" etcetera.
View 1 Replies
Feb 5, 2012
so i am new to v basic and as you can see in the picture below that i have 2 textboxes just to put in them 2 numbers and then do mathematical calcualtions on them and a label up there that shows the answer so i wanted to make 1 textbox to type in the 1 st number then press the symbol for example + and then type the 2nd number and then press equal so the result is formed in the same textbox the only problem is idk how i searched google but i couldnt understand here is my source code
[Code]...
View 1 Replies
Dec 21, 2010
I'm having an issue trying to get a wage calculator to recognize an overtime formula. The calculator has to have the overall function of figuring the gross pay, Federal Tax Withheld (15%), and the net pay based on the hourly wage and hours worked for the week. The issue I am having is the wage * 1.5 entry (underlined) where it sates it is not an array or a method and cannot have an argument list. If anyone can take a look at this for me and guide me as to why this error keeps coming up and what I can do to make sure it doesn
View 36 Replies
Feb 2, 2012
I am trying to write code with IF statements for a payroll calculator. The first IF statement is getting a bit confusing. I have three text fields that I want to ensure have data before proceeding with the next set of code. This is the part I am not sure I am doing right.
IF IsNothing(txtHoursWorked.Text) OR
IF IsNothing(txtEmpName.Text) OR
IF IsNothing(txtHourlyPayRate.Text) Then
[code]....
View 6 Replies
Jan 18, 2011
i am trying to create a kind of calculator for fuel usage with menus lemme show ya the code:
Public Class frmFuelCalc
Private Sub AboutFuelCalcToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutFuelCalcToolStripMenuItem.Click
MsgBox("Guru Software" & vbCrLf & "Fuel Calculator Version 1.0.0.0" & vbCrLf & " Copyright 2011 © " & vbCrLf & " Guru Software Design â„¢ All Right Reserved", MsgBoxStyle.Information, "Fuel Calculator")
[code]....
View 1 Replies
Feb 3, 2012
I have written the below code for a payroll calculator. When I run the program, it gives me my own error message box no matter if my number of hours fall within the 5-60 hours range as I have stipulated. Is there something wrong with my code? (well, obviously there is something wrong--I just cant find it!)
CODE:
'This program calculates the Gross and Net Pay as well as the Tax Deduction amount of an employee's wages when given the input of Employee Name, Tax Rate, Hours Worked, and Hourly Pay Rate.
CODE:
View 5 Replies
Sep 29, 2010
Sweet candy store currently has a special offering of heart shaped candy. It comes in two sizes: small and large. The company sells the large one for $29.50 and the small for $16.25.Design an application to calculate how much a costumer owes. When the user clicks the "Calculate" button, the program gets the number of large and small chocolate hearts ordered from the textboxes, calculates and displays the extended price for each type of the chocolate in a label. The program also calculates the weight of the chocolate to determine the shipping cost, displays the total weight, the shipping cost and the final total due. The large chocolate weighs 4 pounds 10 ounces, and the small one weighs 2 pounds 14 ounces. Shipping cost is 35 cents per pound and 3 cents for each additional ounce. Display all dollar amounts except the final total due with 2 decimal places. Display the FINAL TOTAL DUE with a leading dollar sign and 2 decimal places. Be sure to also include a CLEAR button that will remove all inputs/outputs from the form, and an EXIT button. Define the CALCULATE button as the accept button and the EXIT button as the cancel button.
View 4 Replies
Dec 17, 2010
You could check to see if the distance across the form minus the distance across the picture box is equal to the horizontal location of the picture box to see if it's on the right side. For the left side, just check if the horizontal location of the picture box is 0.
View 2 Replies
Jun 3, 2010
I am here again begging for help with homework. I have to write this program to display three mortgage payments simultaneously using an array for three types of loans, that part of my program does work... Then I must amortize all three loans at once using a loop for comparison so the user can see: [code] I can't get the amortization to show. [code]
View 7 Replies
May 19, 2011
I am having a problem trying to pause/hesitate my loop for a couple of seconds and then iterate through the loop, but pauses every 10th iteration. I have my loan amortization displaying correctly but cannot get it to pause to list only 10 items at a time. 'This section uses the for loop to display the Loan Balance and Interest Paid over the Term of the Loan.
Dim counterStart As Integer
For counterStart = 1 To LoanTerm
'Performs Calculations for Amortization of loan.
InterestPaid = LoanAmount * InterestRate
[code]....
View 5 Replies
Dec 9, 2010
I am working on a calculator that does the annual percentage rate. The code has to use a For Loop (which I am new to). This is the code I have so far.
[Code]...
View 9 Replies