Class textObject
backGroundColor As Integer
textColor As Integer
contentString As String
Sub New (bColor As Integer, tColor As Integer,_
cString As String)
backGroundColor% = bColor%
textColor% = tColor%
contentString$ = cString$
Print "Creating new instance of text object ..."
Print "Text object state:"
Print "Background color:" ; Me.backGroundColor% ; _
"Text color:" ; Me.textColor%
End Sub
Sub Delete
Print "Deleting text object."
End Sub
Sub InvertColors
Dim x As Integer, y As Integer
x% = backGroundColor%
y% = textColor%
Me.backGroundColor% = y%
Me.textColor% = x%
End Sub
End Class
Dim zz As New textObject(0, 255, "This is my text")
zz.InvertColors
Delete zz