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