Develop A Fahrenheit / Celsius Converter?
Mar 27, 2012I've got this far with my interface and layout and buttons. I cannot figure out to do the functions for converting to and from celsius and fahrenheit.[code]...
View 2 RepliesI've got this far with my interface and layout and buttons. I cannot figure out to do the functions for converting to and from celsius and fahrenheit.[code]...
View 2 RepliesThis is what i have i need for it to run and ask for celsius instead of fahrenheit but it is not doing it..
[code]...
I am not understand this at all i am suppose also ask users to input a celsius degree for this part.its telling me i nedd to change formula to calculate the fahrenheit temp for this part.
I am not quite understanding I am working with Microsoft Visual basic .Net programming and I Have this so far
Sub Main()
Dim fahrenheit, celsius As Double
Console.WriteLine("Enter a value for fahrenheit tempature:")
[code].....
I've been looking at this code for about 3 days now and I can't seem to get what I did wrong. When I run it as a console application I get "0 : 32" a lot of times.
The purpose of this code is to start at 0 degrees Celsius and work our way up to 100 by 10's. IE:
0 degrees C = 32 degrees F
10 degrees C = 50 degrees F
etc.. too
100 degrees C = 212 degrees F
Module Module1
Sub Main()
'Program: Celsius to Fahrenheit Conversion
'Programmer: T
[CODE]...
I've figured out the Variable declaration and coding to make it work:
Dim Celsius, Fahrenheit As Double
Try
Celsius = CDbl(txtCelsius.Text)
[Code]....
I'm gettting an "error": Option strict on dissallows implicit conversions from string to double? I have a textbox for celsius input that I want stored and converted into a label with the Convert Button Click Event.
I am creating a program that will convert Celsius to Fahrenheit and visa versa. The program must use a function to return the answer. I'm using a string function that will return either the temperature in Celsius or Fahrenheit or "Please enter a valid temperature" if anything but a number is entered. TryParse is used to check if the input is valid.
When using the TryParse method in the function I am trying to use a parameter to pass the variable that will store the converted data type value [Code] The line " If Double.TryParse(tempTextBox.Text, scale) Then " is supposed to check if the conversion is possible and if it is pass either F or C as a variable to the scale parameter. It seems to verify the conversion all right but it doesn't actually do the conversion. Why isn't doing the conversion? Both F and C remain 0. I can get it to work by using two more TryParse methods (one in each branch of the If else statement in the function), but I'd rather not do this.
I have already completed most of the program and it works, except when there is no input in the Fahrenhiet or is left blank.I get the following exception: on this code: Inputsingle = CSng(TextBox1.Text).Conversion from string "" to type 'Single' is not valid.Here is my code:
'Project" Convert Tempertures
'Progammer: Cathy R. Hjelm
'Description: Convert Fahrenheit temperture to Centigrade Temperature using a convert button and output Text Box[code]....
I am working on a school project to make a temperature converter that when fahrenheit is entered into textbox1 and then tabbed, the conversion to celsius, rankine, and kelvin is displayed in textbox 2,3, and 4.My instructor showed me how to input the code for this, but it isn't working correctly. I know I need more code to get this right but I am a newbie to programming and my instructor doesn't insruct very well. Can someone please tell me what I need to do to finish this coding? This is what I have so far:
Public Class Form1
[Code]...
I'm trying to develop a converter of sorts, and I need it to always round up, however, math.ceiling is not working like I would like. The converter I'm trying to develop is a Canadian MMAR Calculator.Here is my code.
Public Class Form1
Private Property growtype As Object
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click[cod
For some reason, when the variable < .5 it rounds down, and when the variable is > .5 it rounds up, I thought math.ceiling always rounded to the highest nearest whole.The issue comes at growtype 2 and 3, this equation "(num1 * 365) / (250 * 1) * 1.3" where num1 = 18 returns 34.164, I want this to round up to 35.
Project to develop tidal height prediction system for mobile accplications. how to start! The first objective is to develop a calendar converter. i have tried to do the interface.
View 2 RepliesI'm new to visual basic and have decided to make a temperature conversion program. I've attached a screenshot to aid in my description. The program reads the temperatures on the left(from text boxes), converts them, and displays the answers on the right in text boxes. The program has a fever check at the bottom which displays whether or not the converted values are a fever.
I've managed to get this to work no problem, but I'm trying to get it so if the user enters the temperatures directly into the "result" textboxes, that the fever check still works. Unfortunately I'm having no luck, the fever check will only display a message if the values have been converted, not directly entered by the user. Here is the code I tried(fever.Text is what is displayed in a textbox above the fever check button):
Private Sub FeverCheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FeverCheck.Click
'Turn string values entered into Decimal Values so they can be compared to decimal values
Dim fahrfever As Decimal
Dim Celsfever As Decimal
'The following two lines have problems when debugging
[Code] .....
The formula is F = 9/5C + 32 where F is Fahrenheit and C is centigrade temperature.I've this code but the result shows 32 no matter what I enter. How come?
Dim intTemp As Integer
Dim intResult As Integer
' calculation
intResult = (1.8 * intTemp) + 32
[code]....
The lesson exercise is to convert from both Cecilius and Fahrenheit using two sub procedures. I thought I had this one in the bag..seemed pretty easy when I was doing it but my calculations are always 0..
This includes two radio buttons one for F and one for C the tempature text box and the results lbl along with two buttons, convert and exit. (see attached screen clipping)
Option Explicit On
Option Strict On
Option Infer Off
[Code].....
I have made simple design for the program
2 texboxes
2 forms
Form1 has:C# to VB converter 2 textbox (where they will put the code from C# or VB ):1 that will put info: other that will apeear the converted text 1 button
I need source how to make when its press button1 to show them in new texbox the souce code that he selected
Form2: VB to C# converter. i need the same and for VB to C# code when its pressed button for Form2
how to convert a project from VB6 to VB.NET using this method below ?
Visual Studio >> File >>Open >>Convert..
Had some plug in or even executable to tell me?
i am a beginner and trying to write a program that can convert .dwg file into .xml file format.i am familiar with visual studio 2008, vb.net and autocad 2007.
View 6 RepliesShow me a site where there is good conversion available from vb.net to c#?
View 8 RepliesMy boss has given me a new task of converting his old vb projects to new new .net projects. He wants me to convert both windows as well as web applications to the latest versions. As I am new to programming, I am having difficultly in converting the codes.w if there is any free VB6 to VB.Net Converter which can convert all code. And also let me know if there is any good way to manually convert VB6 code to VB.Net code.
View 6 Repliesexisting tool which converts VB.NET Code to Java.
View 1 RepliesI have a button that i basically want to either show or hide it based on if a certain string has a value or not. I create the buttons in code so i was trying to used databindings with a converter but i can't seem to get the converter on the binding after the value changes. I'm not sure if I'm going after this correctly or not... Here is what i have for creating the button and the binding and the converter. "sFileLocation" is a string inside my class "QuestionsFile". This works for initialization but its just when the value of the string changes, this binding doesn't see the change and doesn't run the converter and all that for me...
Dim btn2 As New Button
Dim b2 As New Binding("sFileLocation")
b2.Mode = BindingMode.TwoWay
[code]....
The thing I don't understand too is that the binding works fine if i just binding the property to the Button.Content. So the property is updating correctly when it gets changed, and the buttons content changes accordingly.
.NET converter (either C# or VB.NET)? I've inherited a bunch of Delphi code, never seen Pascal before and rather than learn it, I'd rather just try to use an automated converter, if available, and clean up the code after that. Can't seem to find this kind of tool anyway I search
View 3 Repliesi wanted to know if there is any code converter around that can translate from the ruby language to vb.net.
View 14 Repliesi'm trying to make a converter, i have 4 textboxes, 2 of them are encode, the other 2 are decoders.
on the encode process i use:
[code...]
I want it to be decoded when a button is pressed, because I cant use the KeyPress or KeyDown function because it will most likely be copy-pasted.
how would i do that, for instant the char A Will be converted from "W11" to "A".
Now i know there is a function called Convert, but i have no idea on how it works or if it even is proper for this task.
Converting an html template to PDF document using vb.net code.I've a very complex html with lot of tables etc.
Are there some free tools to be used to convert html to pdf using code ?
can i know how to work with Visual Basic in Visual Studio?
View 2 RepliesIve tried to make my converter to work but the XAML doesn't know where it is.. but its there in a folder called Converters. Here how my XAML are setup..Fill="{Binding RequestStatus, Converter={StaticResource converters:StatusToColorConverter}}">
[Code]...
i have this code to convert an entire .txt file folder into an .rtf file folder.. achieved from one of my question threads.
[Code]...
I am trying to create a program that renames files to 1 - (however many files are in the folder) and also convert .pngs to .bmps.
If RadioButton1.Checked = True Then
Dim files As String()
files = IO.Directory.GetFiles(TextBox1.Text)
Dim filepath_new As String
filepath_new = TextBox1.Text
For Each filepath As String In files
[Code] .....
I'm doing a little app that basically has 2 text boxes. You'll enter Fahrenheit into TextBoxA and Celsius into TextBoxB.As the text changes in TextBoxA I want the equivalent Celsius value to be displayed in TextBoxB and vice versa.Is there a way to do it all in Xaml except for a Convert class that does the maths? So basically I want the TextChanged event of one textBox to pass in it's value into a Converter class that is evaluated and sent to the other TextBox and visa versa.
View 2 RepliesI am creating a text converter, that allows the user to input text to a multi-line textbox, called "Input".The text to input in the box is like this: "CreateObject(3524, 213.53, 1748.10, 17.00, 0.00, 0.00, 0.00);".Then I want the application to read all the coordinates insidde the () and output it in another textbox called "output".
The output is supposed to have this format: "CreateDynamicObject(3524, 213.53, 1748.10, 17.00, 0.00, 0.00, 0.00, 0, 0, -1, 200);". Note the coordinates inside the () are the same as in the input format, but "CreateObject" is replaced with "CreateDynamicObject", and ", 0, 0, -1, 200" is added after the coordinates inside the ().I already created all the boxes etc, only thing needed is the coding.