top of page

Public Class Form1 

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        'Called by Main Program whenever required to perform Task.

        Value(5, 6)    'Declare Sub Procedure Value
        Input("Value") 'Declare Sub Procedure Input
        Math(10, 20)   'Declare Sub Procedure Math
        Main(5, 6)     'Declare Sub Procedure Main
        Procedure("Sub Procedure")     'Declare Sub Procedure Procedure
        Task("Accept Input Procedure") 'Declare Sub Procedure Task


    End Sub

    ' A Sub Procedure is a Procedure that performs a Specific Task.
    ' and to return a Value. But it does not return a Value associated
    ' with its Name. However it can return a Value through a Variable Name
    ' Sub Procedures are usually used to accept Input from the User.
    ' Display Information, Print Information, Manipulate Properties or
    ' Perform some other Tasks.
    ' In addition it is a Program Code by itself but is not an Event Driven
    ' Procedure because it is not associated with a Runtime Procedure.

    Sub Value(a As Single, b As Single)
        Label1.Text = a & " + " & b & "  =  " & a + b
         End Sub
    
    Sub Input(
S As String)
        Label2.Text = S
    End Sub

    Sub Math(c As Single, d As Single)
        Label3.Text = c & " + " & d & "  =  " & c + d
    End Sub

    Sub Main(a As Integer, b As Integer)
        Label4.Text = a & " x " & b & "  =  " & a * b
    End Sub

    Sub Procedure(P As String)
        Label5.Text = P

    End Sub

    Sub Task(T As String)
        Label6.Text = T

    End Sub

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

        Me.Close()

    End Sub

End Class

Website Links-173.jpg
bottom of page