0 Replies - 1135 Views - Last Post: 18 November 2006 - 06:43 AM Rate Topic: -----

#1 lab3tech  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 46
  • Joined: 28-October 06

testing an enhanced button control

Posted 18 November 2006 - 06:43 AM

I am using Visual Studio.NET 2003 and have built a enhanced button control (enhbutton) to capture the number of times the button has been clicked. I did the code and did a build. I then added a test program (buttontest), added the enhbutton control and set buttontest as the startup program. I cannot get the number of times the button is clicked to display on the face of the button. A 0 is put in by the enhbutton code as the starting point. My code for the enhanced control is as follows:
Private Sub EnhBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnhBtn.Click

End Sub
Public Property clicks() As Integer
Get
Dim instance As MouseEventArgs
End Get
Set(ByVal Value As Integer)
EnhBtn.Text = Value
End Set
End Property
End Class

I think I need to get instance.clicks in here, but am not sure where to etner it. The code for the test program is as follows:
Private Sub EnhButton1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles EnhButton1.MouseDown
EnhButton1.Text = EnhButton1.clicks

End Sub
End Class

Any assistance would be appreciated!

Is This A Good Question/Topic? 0
  • +

Page 1 of 1