When I try again to simulate the clock, the doubts that once appeared again in my mind, that is, "The enabled attribute of the command button is true by default. No doubt." why should we set the enabled attribute of cmd2 to true in the following program?
This problem has plagued me more than once. I remember that when I gave VB tutoring to my freshman year, I still had a question mark in my mind? When I met it this time, I did not go back to implement it. I only thought that this problem should not be a problem for me. After all, I had been brewing for so long, and I was so happy. It was so simple.
The following is my implementation process.
1)
Because the enabled of ipv2d is true by default, isn't setting it again?
Result of running the program
Click Start to finish. It is normal that the question is not answered.
When I continue to start, the following occurs:
It seems that this stopwatch is a one-time test. I think we have never heard of a one-time stopwatch when we have used disposable chopsticks and disposable masks? The cost is too high.
2)
Click Start to end. No problem.
It's okay.
Stopwatch created successfully.
Analysis: When "20172enabled = true" is not set, when cmd1 is pressed, cmd1 becomes grayed out due to disabled 1.enabled = false. At this time, cmd2 is available (enbled defaults to true ); when cmd2 is pressed, cmd2 becomes grayed out and cmd1 is available because ipv2.enabled = false and ipv1.enbled = true. (This is the status after the stopwatch runs once)
When we press cmd1 again, when the expires 1.enabled = false, the cmd1 button becomes grayed out, because cmd2 becomes grayed out during the above process, so far, stopwatch can no longer be used.
Summary:
It seems that you will be pleasantly surprised to find out what is superfluous on the surface and find out that his potential value will create great wealth for society.