Question

Need help with develop Visual C# Exercise 4-3 form to display the Fahrenheit temperature and corresponding...

Need help with develop Visual C# Exercise 4-3 form to display the Fahrenheit temperature and corresponding Celsius temperature for Fahrenheit temperatures ranging from -40 to +40 degrees, at increments of 10. Use a for loop. The conversion formula is Celsius (Fahrenheit - 32) * 5/9. I ran the following but nothing is displaying in my listbox.

I am not familiar with Form1_load, see below. I am not sure how to create in my form. Help please

private void Form1_Load_Click(object sender, EventArgs e)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

I have implemented the Code to convert Fahrenheit to Celsius, using VB per the given description.

I HAVE ALSO INCLUDED HOW TO CREATE THE APPLICATION AT THE END.

Please find the following Code Screenshot, Output, and Code.

ANY CLARIFICATIONS REQUIRED LEAVE A COMMENT

1.CODE SCREENSHOT :

2 references Public Class Form1 O references Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Va

2.OUTPUT :

File C = PI Forn VE WindowsApplication2 (Running) - Microsoft Visual Studio Form1 х Tools Test Analyze Window Help Any CPU Co

3.CODE :

Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'Variables to store Fahrenheit and Celsius
        Dim Fahrenheit As Double
        Dim Celsius As Double
        'add the heading 
        ListBox1.Items.Add("Fahrenheit-Celsius")
        'For Loop from -40 to 40 with step 10
        For Fahrenheit = -40 To 40 Step 10
            'calculate the Celsius with the given formula
            Celsius = (Fahrenheit - 32) * (5 / 9)
            'add the read item to list box
            ListBox1.Items.Add("" & Fahrenheit & "  =  " & Celsius)
        Next Fahrenheit
    End Sub
End Class

STEPS TO CREATE A VB APPLICATION:

Quick Launch (Ctrl+Q) Start Page - Microsoft Visual Studio Edit View Debug Team File Tools Test Analyze Window Help Sign in 1

Click OK.

Then we have :

Form1.vb* Form1.vb [Design]* X다 o Form1 x Server Explorer Toolbox Data Sources

The add a listbox from toolkit.

NOW DOUBLE CLICK INSIDE THE FORM THEN IT WILL OPEN THEN THE GIVEN CODE:

Prop 놓 Form1.vb* + X Form1.vb [Design]* + X VB WindowsApplication2 4 (Form1 Events) 4 Load 2 references Public class Form1 -

Now add the following code in the above

Quick Launch (Ctrl+Q) File WindowsApplication2 - Microsoft Visual Studio Edit View Project Build Debug Team 0-9.2.So Debug An

Add a comment
Know the answer?
Add Answer to:
Need help with develop Visual C# Exercise 4-3 form to display the Fahrenheit temperature and corresponding...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C# Temp. Converter program. Create a Celsius and Fahrenheit Temperature Converter application. The application must have...

    C# Temp. Converter program. Create a Celsius and Fahrenheit Temperature Converter application. The application must have 2 Labels (each one of them assigned only to Celsius and Fahrenheit), 2 TextBoxes (each one of them assigned only to Celsius and Fahrenheit), only 1 Convert Button, 1 Clear Button, and 1 Exit Button. Also, 1 Error message label which will display the error messages. The application should only allow the user to enter the desired temperature just in one of the TextBoxes...

  • C# I am having trouble this program. So far my temperature converter program is converting temps...

    C# I am having trouble this program. So far my temperature converter program is converting temps from C to F. However, whenever I try to convert F to C, it's keep crashing and displaying an error message, which I can not figure it out and do not know how to fix it. Attached are two screenshots are of message. Do you know what is causing the issue? I would much appreciate your assistance. namespace Temp Conv { public partial class...

  • C# Temperature Converter Application: I have most of the application complete I just need only help...

    C# Temperature Converter Application: I have most of the application complete I just need only help with error messages. My instructor wants me to show four error messages inside an error message label (not a message box) and all of the error messages should appear inside error message label. The four error messages should appear when: 1: User enters data inside both Celsius and fahrenheit text boxes: “You should enter data in only one textbox. Press Clear to start over.”...

  • Here is my skeleton code to this C# assignement I need to add a few things,...

    Here is my skeleton code to this C# assignement I need to add a few things, Change the the switch to If and Else-If statements (and test it is still working here) Add a third "Submit" button called SubmitButton In your If and Else-If add a condition if city is Honolulu and SubmitButton is checked. Display "Honolulu is the best place to be this time of year! I wish I was there!". Add comments, including header. HELP PLEASE ASAP public...

  • how to add methods into thjs code using C# on visual studio? -validatetextbox should return a true false depending if input is valid -resetinput should clear all input and restart radiobuttons...

    how to add methods into thjs code using C# on visual studio? -validatetextbox should return a true false depending if input is valid -resetinput should clear all input and restart radiobuttons to the defult positions -displaymessge must display messge box to the user displaying such as “5+8=12” calculator.cs x Prearam S Miscellaneous Files ator.Designer.c s Calculato 1 曰using Systemi 2 using System.Collections.Generic; using System.ComponentModel; 4 using System.Data; s using System.Drawing; 6 using System.Linq 7using System.Text; 8 using System.Threading.Tasks; 9 using...

  • Murach's C# 2015 Training & Reference: I need help with both Exercise 4-1. I figured out...

    Murach's C# 2015 Training & Reference: I need help with both Exercise 4-1. I figured out steps 1-4, but not understanding how to modify the code for 5 & 6. Code is: private void btnCalculate_Click(object sender, EventArgs e)        {            decimal subtotal = Convert.ToDecimal(txtSubtotal.Text);            decimal discountPercent = .25m;            decimal discountAmount = subtotal * discountPercent;            decimal invoiceTotal = subtotal - discountAmount;            txtDiscountPercent.Text = discountPercent.ToString("p1");   ...

  • I need help regarding my Visual Basic code ISC/ITE 285 Homework Due: Monday, January 28 by...

    I need help regarding my Visual Basic code ISC/ITE 285 Homework Due: Monday, January 28 by 11:55 pm Create a text file named "Grades.txt" which will contain a list of numeric grades. Save the file in the projects Bin/Debug folder. A sample of the file contents is shown below: 80 96 95 86 54 97 Create a string array that will be populated from the file "Grades.txt" when the array is created (Class-level array). Also create a numeric array that...

  • Hey I really need some help asap!!!! I have to take the node class that is...

    Hey I really need some help asap!!!! I have to take the node class that is in my ziplist file class and give it it's own file. My project has to have 4 file classes but have 3. The Node class is currently in the ziplist file. I need it to be in it's own file, but I am stuck on how to do this. I also need a uml diagram lab report explaining how I tested my code input...

  • C#: I am working on this application and keep running into this error. Please help me fix it. Err...

    C#: I am working on this application and keep running into this error. Please help me fix it. Error: Design: Code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace SinghAjayProgram08 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } double totalInserted = 0; double totalWon = 0; private void spinButton_Click(object sender, EventArgs e) { Random rand = new Random(); int index = rand.Next(fruitsImageList.Images.Count); firstPictureBox.Image =...

  • JAVA JAR HELP...ASAP I have the code that i need for my game Connect 4, but...

    JAVA JAR HELP...ASAP I have the code that i need for my game Connect 4, but i need to create a jar file . the instructions are below. It has to pass some parameters. I am really confused on doing so.l I dont know what to do next. Can someone help me and give detailed descritiopm opn how you ran the jar file in CMD import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Connect4 {               ...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT