top of page

The Code

 

 

 

 

Public Class Form72

    '## Maths Functions ##
    '## Built-In Mathematical Functions ##
    '## The Fix Function Truncates the Decimal Part of a Number and Returns ##
    '## The Largest Integer smaller than the Number ##
    '## However, when the Number is Negative, it returns the Smallest Integer ##
    '## Larger than the Number. ##

    '## Fix does not belong to the Math Class, therefore, we do not use the Math Keyword ##

    Dim Number1 As Double
    Dim
Number2 As Double
    Dim
FixValue As Double
    Dim
DecFormat As String = "Fix =  ##.##"

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

        '## EXP Function returns the Exponential Value of a Number ##

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

        '## Math keyword indicates that exp Function belongs to Math Class ##

        Number1 = TextBox1.Text
        FixValue = Fix(Val(Number1))
       
Label1.Text = Format(FixValue, DecFormat)

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


        Number2 = TextBox2.Text
        Label2.Text = Format(Fix(Val(Number2)), 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

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

        Form65.Show()
        Me.Hide()

    End Sub


End Class

Website Links-173.jpg
bottom of page