Solve the problem of one-time stopwatch

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.