0% found this document useful (0 votes)
7 views2 pages

Visual Basic Assignment

The document outlines three Visual Basic projects: an addition calculator, a welcome message display, and a simple interest calculator. Each project includes design elements such as labels, text boxes, and buttons, along with corresponding code for functionality. The projects illustrate user input collection, arithmetic calculations, message display, and basic Windows Forms design in Visual Basic.

Uploaded by

ajilaranolatunde
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Visual Basic Assignment

The document outlines three Visual Basic projects: an addition calculator, a welcome message display, and a simple interest calculator. Each project includes design elements such as labels, text boxes, and buttons, along with corresponding code for functionality. The projects illustrate user input collection, arithmetic calculations, message display, and basic Windows Forms design in Visual Basic.

Uploaded by

ajilaranolatunde
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Visual Basic Assignment Solutions

Project 1: Addition of Two Numbers


Design:
Labels: First Number, Second Number, Result
TextBoxes: txtNum1, txtNum2
Button: btnAdd

Code:
Public Class Form1
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles [Link]
Dim num1, num2, sum As Double
num1 = Val([Link])
num2 = Val([Link])
sum = num1 + num2
[Link] = "Sum = " & sum
End Sub
End Class

Project 2: Welcome Message Display


Design:
Button: btnDisplay
Label: lblMessage

Code:
Public Class Form1
Private Sub btnDisplay_Click(sender As Object, e As EventArgs) Handles [Link]
[Link] = "YOU ARE WELCOME TO VISUAL BASIC CLASS"
End Sub
End Class

Project 3: Simple Interest Calculator


Formula:
SI = (P × R × T) / 100

Design:
TextBoxes: txtPrincipal, txtRate, txtTime
Button: btnCalculate
Label: lblAnswer

Code:
Public Class Form1
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles [Link]
Dim P, R, T, SI As Double
P = Val([Link])
R = Val([Link])
T = Val([Link])
SI = (P * R * T) / 100
[Link] = "Simple Interest = " & SI
End Sub
End Class

Conclusion
These projects demonstrate:
- User input collection
- Arithmetic calculations
- Message display
- Event-driven programming
- Basic Visual Basic Windows Forms design

You might also like