top of page

The Code

 

 

 

Public Class Form70

    '## Maths Functions ##
    '## Built-In Mathematical Functions ##

    '## Dimension Variables in Public Class ##


    Dim Number As Double
    Dim
AbsValue As Double
    Dim
DecFormat As String = "##,##.##"

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


        Form65.Show()
        Me.Hide()


    End Sub

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

        '## ABS Function returns the Absolute Value of a Number ##

        '## Assigning Value to Variable ##
        '## Assign Variable to Label.Text for Formatting ##

        '## Math keyword indicates that abs Function belongs to Math Class ##
        Number = TextBox1.Text
       
AbsValue = Math.Abs(Number)
        Label1.Text = Format(
AbsValue, DecFormat)

        '## Assigning Value Label ##
        '## Assigning Variable to Label alternative Formatting  ##

        Number = TextBox2.Text
        Label2.Text = Format(Math.Abs(
Number), DecFormat)

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

        TextBox1.Text = ""
        TextBox2.Text = ""
        Label1.Text = ""
        Label2.Text = ""

    End Sub


End Class


 

Website Links-173.jpg
bottom of page