开发者

VB.net 3.5: How do i calculate a running total number of Click events a button has recieved over the course of the runtime

开发者 https://www.devze.com 2023-01-15 02:55 出处:网络
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 projec

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消