Click here to Skip to main content
15,887,394 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Variable Question Pin
DJHJr21-Apr-14 10:10
DJHJr21-Apr-14 10:10 
GeneralRe: Variable Question Pin
Wes Aday21-Apr-14 11:47
professionalWes Aday21-Apr-14 11:47 
GeneralRe: Variable Question Pin
DJHJr21-Apr-14 13:09
DJHJr21-Apr-14 13:09 
GeneralRe: Variable Question Pin
Wes Aday21-Apr-14 13:14
professionalWes Aday21-Apr-14 13:14 
GeneralRe: Variable Question Pin
DJHJr21-Apr-14 13:17
DJHJr21-Apr-14 13:17 
GeneralRe: Variable Question Pin
DJHJr28-Apr-14 6:22
DJHJr28-Apr-14 6:22 
Questionrunning AxAcroPDF in a dialog, right choice or not Pin
jkirkerx20-Apr-14 9:49
professionaljkirkerx20-Apr-14 9:49 
QuestionHelp... Again... Pin
Member 1072866720-Apr-14 6:42
Member 1072866720-Apr-14 6:42 
Assignment
It’s often necessary to convert between units. In this exercise, you will create two functions for converting between units of distance. The first function will be called ConvertMilesToKilometers(), which will accept one parameter for the number of miles. It will return the equivalent number of kilometers. The second function will be called ConvertKilometersToMiles() and will accept kilometers as its parameter; this will return the equivalent number of miles.

The main method will ask the user if he or she wants to convert miles to kilometers or kilometers to miles. It will then ask for the number of miles or kilometers. It will call the appropriate method and display the converted value.

To convert miles to kilometers, divide miles by 0.62137. To convert kilometers to miles, multiply kilometers by 0.62137.

Example
Do you want to convert to Miles or Kilometers? (M or K): K
Enter number of Kilometers: 3.5
3.5 kilometers equals 2.174795 miles.
AnswerRe: Help... Again... Pin
Member 1072866720-Apr-14 6:44
Member 1072866720-Apr-14 6:44 
GeneralRe: Help... Again... Pin
Wes Aday20-Apr-14 7:03
professionalWes Aday20-Apr-14 7:03 
GeneralRe: Help... Again... Pin
Member 1072866720-Apr-14 8:13
Member 1072866720-Apr-14 8:13 
GeneralRe: Help... Again... Pin
Wes Aday20-Apr-14 8:36
professionalWes Aday20-Apr-14 8:36 
GeneralRe: Help... Again... Pin
Tino Fourie24-Apr-14 7:00
Tino Fourie24-Apr-14 7:00 
QuestionAbout handling MSComm events in VB6 Pin
Member 1056890820-Apr-14 5:20
Member 1056890820-Apr-14 5:20 
AnswerRe: About handling MSComm events in VB6 Pin
Eddy Vluggen21-Apr-14 8:18
professionalEddy Vluggen21-Apr-14 8:18 
GeneralRe: About handling MSComm events in VB6 Pin
Member 1056890821-Apr-14 14:27
Member 1056890821-Apr-14 14:27 
GeneralRe: About handling MSComm events in VB6 Pin
Eddy Vluggen21-Apr-14 22:33
professionalEddy Vluggen21-Apr-14 22:33 
GeneralRe: About handling MSComm events in VB6 Pin
Nicholas Marty22-Apr-14 0:06
professionalNicholas Marty22-Apr-14 0:06 
GeneralRe: About handling MSComm events in VB6 Pin
Member 105689083-May-14 21:41
Member 105689083-May-14 21:41 
QuestionRounding To 2 Decimal Places Pin
Member 1072866719-Apr-14 16:46
Member 1072866719-Apr-14 16:46 
AnswerRe: Rounding To 2 Decimal Places Pin
Richard MacCutchan19-Apr-14 21:22
mveRichard MacCutchan19-Apr-14 21:22 
QuestionQueue and Stack Pin
DJHJr17-Apr-14 8:04
DJHJr17-Apr-14 8:04 
AnswerRe: Queue and Stack Pin
Eddy Vluggen17-Apr-14 8:31
professionalEddy Vluggen17-Apr-14 8:31 
GeneralRe: Queue and Stack Pin
DJHJr17-Apr-14 9:07
DJHJr17-Apr-14 9:07 
GeneralRe: Queue and Stack Pin
Eddy Vluggen17-Apr-14 10:24
professionalEddy Vluggen17-Apr-14 10:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.