Main form pop-up box, experience summary

Source: Internet
Author: User

In the previous period of time to do wireless passive temperature measurement project, the production of pop-up frame ideas: all using. Show () to complete.

The problem is: Trigger once, pop a box, apparently not up to the requirements, and then pass through the form between the value,

After the form is first triggered, the condition mask is triggered until the popup box is destroyed and the trigger is turned on.

In fact, the popup box can be completely completed with. ShowDialog ().

However, this way when the pop-up box is not destroyed, you can not manipulate other content, applicable to the production of the Welcome page, about the page production and so on.

And the above mentioned aspect, can implement the popup box existence only one time, realizes to the other content operation, but the implementation is somewhat complex.

Essence: See the value of the form!

Pop-up box

1   Public Delegate voidOperate (BOOLFlag);//declaring a delegate2          PublicOperate Operate;//the instantiation of a delegate that controls the Enable property of the Open button that opens this form3 4         Private voidForm25_load (Objectsender, EventArgs e)5         {6             if(Operate! =NULL)7             {8Operatefalse);9             }Ten}
1 Private void Form25_formclosing (object  sender, FormClosingEventArgs e)2{3if  null)4{5 operate (true); 6 }7 }

Main form

1   Private voidTemperature offset Configuration Toolstripmenuitem_click (Objectsender, EventArgs e)2         {3Fr25 =NewFORM25 ();//Temperature Offset Configuration4Fr25.operate =set_ temperature offset configuration toolstripmenuitem_enable;5 Fr25. Show ();6Fr25.operate_wendupianyiliang =Operate_temperaturepianyiliang;7         }8  Private voidset_ Temperature Offset Configuration toolstripmenuitem_enable (BOOLflag)9         {Ten              This. temperature offset Configuration toolstripmenuitem.enabled =Flag; One}

Main form pop-up box, experience summary

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.