Controlling MDI child form from MDI parent panel


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Controlling MDI child form from MDI parent panel

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Posts
    7

    Question Controlling MDI child form from MDI parent panel

    Can anybody help me with this ->

    I have one Parent and few Child (two of which are mentioned here) forms:

    1.MDI Parent (Master.vb)
    2.MDI child (Customer.vb) &
    3.MDI child (Orders.vb).

    On MDI Parent i have a panel (just below the menubar) which has the following buttons:

    1. New
    2. Edit
    3. Save
    4. Delete
    5. Undo
    6. Redo
    7. First
    8. Previous
    9. Next
    10. Last
    11. Search
    12. Print
    13. Close

    Now my problem is how do i determine the active MDIChild form and control it with the buttons located at Master.vb panel ? (Any help with codes would be great!)

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    The MDI form's ActiveForm property returns a reference to the child form that has the focus.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Apr 2007
    Posts
    7
    i have used the following code at the click event of the close button on the Parent form:

    If Not Me.ActiveMdiChild Is Nothing Then

    Me.ActiveMdiChild.Close()

    End If

    after i click the close button at runtime only thing that happens is the activechild (Customer.vb) hides itself and i can see it still open once i minimize the parent form.

Similar Threads

  1. Replies: 7
    Last Post: 08-15-2006, 04:21 PM
  2. MDI Child form positioning Questions:
    By BOOGIEMAN in forum VB Classic
    Replies: 10
    Last Post: 04-25-2005, 02:54 AM
  3. Mdi child form
    By moe188 in forum VB Classic
    Replies: 2
    Last Post: 03-11-2005, 07:43 PM
  4. Replies: 2
    Last Post: 09-14-2000, 12:38 AM
  5. Replies: 0
    Last Post: 09-13-2000, 10:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center