Refactoring-subforms and parent forms

Source: Internet
Author: User

To implement a subform in a parent form with a singleton pattern, you get the following effect:

The code is as follows:

Write a singleton pattern in a subform



in the MDI calls in the form:

Public Subtoolstripmenuitem3_click (sender as Object, e as EventArgs) Handlestoolstripmenuitem3.click        FrmStatusUI.GetInstance.Show ()    End Sub

The design process also encountered a problem, that is, the subform's menu bar ran to the parent form,

In fact, just change the menu properties Ouke, the sub-form of the menu bar properties slightly modified, such as:

AllowMerge property is changed to false , try again, problem solved!

The first time the computer room did not realize this function, this time through the singleton model learned, of course, when the time encountered a lot of trouble, the most likely is not understand, this shows that mixed, always want to still, so we still walk well every step of it, so after encountering problems to solve!

Refactoring-subforms and parent forms

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.