Public Class Form1 WithEvents person1 As New Persons.Persons Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub person1_AgeCalculated(ByVal Age As Integer) _ Handles person1.AgeCalculated If Age > 18 Then MsgBox("You have been over 18 for " & Age - 18 _ & " years.") Else MsgBox("You will be 18 in " & 18 - Age & " years") End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click With person1 .FirstName = TextBox1.Text .MiddleName = TextBox2.Text .LastName = TextBox3.Text .BirthYear = TextBox4.Text .Married = CheckBox1.Checked End With End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click MsgBox(person1.FullName) MsgBox(CStr(person1.Age) & " years old") If person1.Married = True Then MsgBox(person1.FirstName & " is married") Else MsgBox(person1.FirstName & " is single") End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click MsgBox(person1.FirstName & " " & person1.MiddleInitial(True) & _ " " & person1.LastName) End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click MsgBox(person1.FirstName & " " & person1.MiddleInitial & _ " " & person1.LastName) End Sub End Class