top of page

The Code

 

 

 

 

Public Class Form1

    '## 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 Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

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

        Number = TextBox1.Text
        AbsValue = Math.Abs(Number)
       
Label4.Text = Format(AbsValue, DecFormat)

    End Sub

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

        Label4.Text = ""
       
TextBox1.Text = ""

    End Sub

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

        '## Assigning Value Label ##
        '## Assigning Variable to Label has limited Formatting ##

        Number = TextBox1.Text
        Label4.Text = Math.Abs(Val(Number))


    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        Me.Close()

    End Sub


End Class

Website Links-173.jpg
bottom of page