I have built an enhanced button control which I want to use to capture the number of times the button has been clicked. I have added the new control to a test program but cannot get it to work. The code for the enhanced control is as follows:
Private Sub EnhBtn_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles EnhBtn.Click
End Sub
Public Property totclicks() As Integer
Get
Dim n As Integer
totclicks = n + 1
End Get
Set(ByVal Value As Integer)
totclicks = Value
End Set
End Property
End Class
The code for the test program is:
Private Sub EnhButton1_Clic k(ByVal sender As Object, ByVal e As System.EventArg s) Handles EnhButton1.Clic k
Label2.Text = (EnhButton1.tot clicks.ToString )
End Sub
End Class
Thanks in advance for all your help!!
--------------------------------------------------------------------------------
Private Sub EnhBtn_Click(By Val sender As System.Object, ByVal e As System.EventArg s) Handles EnhBtn.Click
End Sub
Public Property totclicks() As Integer
Get
Dim n As Integer
totclicks = n + 1
End Get
Set(ByVal Value As Integer)
totclicks = Value
End Set
End Property
End Class
The code for the test program is:
Private Sub EnhButton1_Clic k(ByVal sender As Object, ByVal e As System.EventArg s) Handles EnhButton1.Clic k
Label2.Text = (EnhButton1.tot clicks.ToString )
End Sub
End Class
Thanks in advance for all your help!!
--------------------------------------------------------------------------------