Shane Partridge
Visual Basic 2013
Public Class Form58
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Form57.Show()
Me.Hide()
End Sub
Private Sub Form58_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label1.Text = ""
Label2.Text = ""
Label3.Text = ""
Label4.Text = ""
Label5.Text = ""
Label6.Text = ""
End Sub
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
'Declaration of Sub Procedures
'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 from User Procedure") 'Declare Sub Procedure Task
' 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.
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 = ""
Label6.Text = ""
End Sub
End Class