Differences between show () and showdialog ()

Source: Internet
Author: User
Show and What is the difference between showdialog and show and showdialog? I believe that you will have a clear answer when reading this blog. Speaking of show and Showdialog Many people will think of the difference that one is a non-modal one is a modal form, the modal form must be closed (ccose) or hidden (hide) in order to operate on other forms. This is only the apparent difference between them. The real difference is not limited to this. There are two essential differences between show and showdialog: one is Code The difference in execution; one is that its own mechanism is different. Differences in Code Execution This difference is easy to find, Show The method is returned immediately when the new form is displayed. Show The code after the method call statement is executed. Showdialog Method calls will be blocked until the new form is closed ,Showdialog The code after the method call statement can be executed. Differences between mechanisms I wonder if you have noticed this. Please refer

Click modal display Form 2, enter some content in the text box, and then click "X" in the upper right corner"

Click "Modal display Form 2" in Form 1 again. At this time, you will find that the text in the text box still exists. What is this? At this time, Form 2 is not close, but is just hide (not sure if it is the same as hide at this time ). If you want to click the mode again to display a New Form 2, you only need to write it in the closing or closed event of Form 2. Me. Dispose. What if I click "Modal display" for the first time, enter the text, drop "X", and click "normal display? What will happen if "X" is dropped again?
Do you want to know the answer? Try it on your own! Haha!

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.