Question

can somebody help me with this please. This is for Visual Basic Write the code for...

can somebody help me with this please. This is for Visual Basic

Write the code for an application that calculates the sum of two integer variables (intVar1, intVar2) and store it in a third integer variable (intSum). You should have two text boxes (txtVar1, txtVar2) and a label (lblSum) to show your result.

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

This will help you to solve the calculation:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        ' Create some variables to hold our values

        Dim intVar1 As Integer

        Dim intVar2 As Integer

        ' Parse our textboxes into integer values

      intNum1 = Integer.Parse(txtVar1.Text)

       intNum2 = Integer.Parse(txtVar2.Text)

        ' Set label1 to add the numbers

        Label1.Text = intVar1 + intVar2

        ' Set label2 to apply multiplication and addition.

        Label2.Text = (intVar1 * 1.0) + (intVar2 * 1.5)

End Sub

Add a comment
Know the answer?
Add Answer to:
can somebody help me with this please. This is for Visual Basic Write the code for...
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
  • PLEASE USE VISUAL BASIC* BY VISUAL STUDIO. Visual Basic INTERMEDIATE Create a Windows Forms application. Use...

    PLEASE USE VISUAL BASIC* BY VISUAL STUDIO. Visual Basic INTERMEDIATE Create a Windows Forms application. Use the following names for the project and solution, respectively: Chopkins Project and Chopkins Solution. Save the application in the VB2017\Chap03 folder. Change the form file's name to Main Form.vb. Change the form's name to frmMain. Create the interface shown in Figure 3-37. The interface contains six labels, three text boxes, and two buttons. The application calculates and displays the total number of packs ordered...

  • visual basic calling and returing functins Write the code for a function named CalculateBonus. The function...

    visual basic calling and returing functins Write the code for a function named CalculateBonus. The function receives two decimal variables representing the salary and bonus rate. The function should calculate the bonus amount by multiplying the salary by the bonus rate, and then return the result. Then write the appropriate statement to invoke the function, passing it the decSalary and decRate variables. Assign the function’s return value to the decBonus variable.

  • please help me finish this, it is for Visual Basic . net in Visual studio 2010...

    please help me finish this, it is for Visual Basic . net in Visual studio 2010 (show pictures of code and of the form please) Lab #5 - Banking Account with Methods Submit Assignment Download Work file Download Runtime Be sure to include comments at the top of each procedure and at the top of the file. Be sure to use meaningful names for all buttons and labels. In this lab you will create a simple banking application that will...

  • guys can you please help me to to write a pseudo code for this program and...

    guys can you please help me to to write a pseudo code for this program and write the code of the program in visual studio in.cpp. compile the program and run and take screenshot of the output and upload it. please help is really appreciated. UTF-8"CPP Instruction SU2019 LA X 119SU-COSC-1436- C Get Homework Help With Che X Facebook -1.amazonaws.com/blackboard.learn.xythos.prod/584b1d8497c84/98796290? response-content-dis 100% School of Engineering and Technology COSC1436-LAB1 Note: in the instruction of the lab change "yourLastName" to your last...

  • Can somebody help me write this in Python shell 3.5 Write a program that will compute...

    Can somebody help me write this in Python shell 3.5 Write a program that will compute integer division using only addition #operation. Assume that the operands are positive integers.

  • Visual Basic: Write the code for a function named GetMajor. The function should prompt the user...

    Visual Basic: Write the code for a function named GetMajor. The function should prompt the user to enter a major field of study and then return the user’s response. Then write a statement to invoke the GetMajor function, returning the result to the strCurrentMajor variable.

  • If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but...

    If you’re using Visual Studio Community 2015, as requested, the instructions below should be exact but minor discrepancies may require you to adjust. If you are attempting this assignment using another version of Visual Studio, you can expect differences in the look, feel, and/or step-by-step instructions below and you’ll have to determine the equivalent actions or operations for your version on your own. INTRODUCTION: In this assignment, you will develop some of the logic for, and then work with, the...

  • Please help with this visual basic code. If they are, indicate in which order the array elements will be processed. Give...

    Please help with this visual basic code. If they are, indicate in which order the array elements will be processed. Give reasons for the ones that are not correct. For j As Integer = 1 To intMAXCOL strBoard(j,i) = "*" For j As Integer = 1 To intMAXCOL strBoard(j,i) = "*"

  • Can you write the code for this It's for Visual Basic I am having a hard...

    Can you write the code for this It's for Visual Basic I am having a hard time getting it to work Telling me error Thank u I will rate a good so other students can learn from this

  • Visual Basic You are asked to develop a Visual Basic Net application that can determine roots...

    Visual Basic You are asked to develop a Visual Basic Net application that can determine roots of a requirements of this project are as follows: 1) Design a form to allow users to define a quadratic equation and to find the roots of the equation. The form should have a label that shows this message: Solving a quadratic equation ax2+bx+c=0 The form should have three textboxes in which users enter the values of a, b, and c The form should...

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