Shane Partridge
Visual Basic 2013
Public Class Form3
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Form1.Show()
Me.Hide()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
'Division of Fractions
Dim a, b, c, d As Single
Dim x, y As Single
Dim z As Single
'Assign Variable to TextBox
a = TextBox1.Text
b = TextBox2.Text
c = TextBox3.Text
d = TextBox4.Text
'Division = Inverted Multiplication
x = (a * d)
y = (b * c) 'Multiply Common Denominators
'Add Fraction Values to Labels
Label1.Text = x
Label2.Text = y
'Calculate Decimal Value
z = (x / y)
'Add Decimal Value to Label
Label3.Text = z
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
Label1.Text = ""
Label2.Text = ""
Label3.Text = ""
End Sub
End Class