I am scripting a VB project for class and need to figure out how to calculate a running total number of Click events a button has recieved o开发者_如何学Pythonver the course of the runtime. The project is supposed to display the total number of times that the Calculate total number of times that the "CalculateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculateButton.Click" procedure has been executed over the course of the runtime.
You need to add a numeric field to your class and increment it when the button is clicked.
If you have any specific questions about how to do this, please ask them directly. (We will not do your homework for you)
It would be far better to use a Window Performance counter that is incremented when the event handler executed, than a local variable. In this way it can be monitored outside the application.
精彩评论