R
Ron
I am writing a very simple program, three buttons NORMAL, SMILE, FROWN.
When the appropriate button is clicked a label either pops up a smile,
frown or a normal face.
I wrote a class to do this. Using the Windings font and the letts J K
L you can get faces.
How do I then use this class for my button click events?
Here is my class:
Public Class Faces
Private s As String = "J"
Private n As String = "K"
Private f As String = "L"
Public ReadOnly Property smile() As String
Get
Return s
End Get
End Property
Public ReadOnly Property normal() As String
Get
Return n
End Get
End Property
Public ReadOnly Property frown() As String
Get
Return f
End Get
End Property
End Class
NOW lets say I want to use that class on this frown button click event?
How would the code look? I was thinking :
Public Class Form1
Private Sub btnFrown_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnFrown.Click
lblface.text = faces.f
End Sub
BUT This does not work. Anyone can tell me how to get this to work?
Do I need to do something before my class will work?
When the appropriate button is clicked a label either pops up a smile,
frown or a normal face.
I wrote a class to do this. Using the Windings font and the letts J K
L you can get faces.
How do I then use this class for my button click events?
Here is my class:
Public Class Faces
Private s As String = "J"
Private n As String = "K"
Private f As String = "L"
Public ReadOnly Property smile() As String
Get
Return s
End Get
End Property
Public ReadOnly Property normal() As String
Get
Return n
End Get
End Property
Public ReadOnly Property frown() As String
Get
Return f
End Get
End Property
End Class
NOW lets say I want to use that class on this frown button click event?
How would the code look? I was thinking :
Public Class Form1
Private Sub btnFrown_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnFrown.Click
lblface.text = faces.f
End Sub
BUT This does not work. Anyone can tell me how to get this to work?
Do I need to do something before my class will work?