* New post Constructor Destructor and Inheritance& Array , Virtual base class in c++ language

Tuesday, 26 February 2013

0 MDI(MULTIPLE DOCUMENT INTERFACE)

MULTIPLE DOCUMENT INTERFACE(MDI)
You are using mdi.forms.mdi frame windows can display multiple child windows inside them.
The main forms form1 ,will be the mdi container or parent,containing mdi children ,so set its ISMDICONTAINER   property to true . This alters its apperance from a white client area to a grey one ; next ,drag a main menu control from the tool box onto form1.
                     CREATING MDI CHILD WINDOWS IN CODE 
NOW , you create a new form class ,form2, the MDI  child windows ,you can create and display a new objects of that class each time .You can click the FILE|NEW MENU items in the program .To make that new form objects  a class windows of the MDI parent ,form1  all we have to do ,is to set its ISMDICHILD property to true because you will working with a number of child windows ,you will store them in an array of forms . 
                                                   CODING  
public class form1
                 Dim a as integer =0
                 Dim  forms(10) as form2
                 Private sub menu item2_click (byval sender as system .objects,byval e as system .eventsargs)
                 a+=1
                 forms (a)= new form2
                 forms(a).MDIPARENT=me
                 forms(a).show()
              end sub 
            end class 

0 comments:

Post a Comment

 

PROGRAMMINGqueen Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates

Blogger Widgets