How to determine whether a form is disabled

Source: Internet
Author: User
Category: Read by 259 Comment (2) Favorites Report

If there is a variable F2 in form1, this variable points to a form2 instance. The form2 window is displayed when the f2.show () method is used in form1. However, when the form2 window is closed by the user, there is still an instance in form1 where F2 points to a form2,That is, F2 will not point to null, even if form2 has been disabled.At this time, how can we determine that the form2 variable pointed to by F2 has been disabled? When a window is closed, it calls its own dispose method to release the resources occupied by this window. Therefore, you canCodeTo determine the value of f2.isdisposed. If it is true, form2 is disabled.That is, the isdisposed attribute can determine whether a window is closed.

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.