Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VBNET
Expertise: beginner
Mar 2, 2002

Showing and enumerating MDI child forms

An MDI child form is a regular form whose MdiParent property points to its MDI container form, so the code that creates and displays a child window is very simple:

Sub ShowMdiChildWindow()
    ' Display the MenuForm form as a child of this form.
    Dim frm As New MenuForm()
    ' Make it a child of this MDI form before showing it.
    frm.MdiParent = Me
    frm.Show()
End Sub
A form that can be used either as a regular form or an MDI child form might need to determine how it's being used. It can do that by testing its MdiParent property or its read-only IsMdiChild property. You can list all the child forms of an MDI parent by using the Form array returned by its MdiChildren property:

Dim frm As Form
For Each frm In Me.MdiChildren
    Debug.Write(frm.Text)
Next
Francesco Balena
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date