top of page

The Code

 

Public Class Form78

    '## 19.1 Format Function for Numbers ##
    '## There are two Types of Format Functions ##
    '## The Built in Function, & User-Defined Function ##

    '## 19.1(a) Built in Format Function for Numbers
    '## The Syntax of a Built-In Format Function is ##
    '## Format (n, "Style Argument")

    Dim FormatNumber As Double

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

        FormatNumber = TextBox1.Text

        Label1.Text = Format(FormatNumber, "General Number")
       
Label2.Text = Format(FormatNumber, "Fixed")
       
Label3.Text = Format(FormatNumber, "Standard")
       
Label4.Text = Format(FormatNumber, "Currency")
       
Label5.Text = Format(FormatNumber, "Percent")

    End Sub

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

        Label1.Text = ""
       
Label2.Text = ""
       
Label3.Text = ""
       
Label4.Text = ""
       
Label5.Text = ""
       
TextBox1.Text = ""

    End Sub

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

        Form73.Show()
        Me.Hide()

    End Sub


End Class

 

 

Website Links-173.jpg
bottom of page