use of mdi
use of mdi
use of mdi
use of mdi
use of mdi
use of mdi use of mdi use of mdi use of mdi use of mdi use of mdi use of mdi use of mdi
use of mdi use of mdi
use of mdi
Go Back  Xtreme Visual Basic Talk > > > use of mdi


Reply
 
Thread Tools Display Modes
  #1  
Old 07-04-2006, 04:34 AM
Banks Banks is offline
Freshman
 
Join Date: Sep 2005
Posts: 38
Default use of mdi


hi,

i am trying to develop an mdi style system so that one parent form holds all child forms. I think i have set up the mdi form correctly, but i cant get some forms to open inside the mdi.

for instance i have a main menu form that does open in the mdi, which has buttons on it which i want to link to other pages. with the code below i have placed on the buttons, the form opens a new window.

Code:
    Private Sub btnRaiseCar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRaiseCar.Click
        Dim frmCar As New frmCar
        With frmCar
            .Text = "Child " & Me.MdiChildren.GetLength(0)
            .WindowState = FormWindowState.Normal
            .ControlBox = True
            .Show()

        End With
    End Sub
i think i may be missing some code assigning the mdiarent but am unsure - the mdi parent form is called mdiCAR.

Thanks, alex
Reply With Quote
  #2  
Old 07-04-2006, 08:14 AM
JNewt's Avatar
JNewt JNewt is offline
Centurion
 
Join Date: Apr 2003
Location: KY (Home), ID (College)
Posts: 138
Default

The child form needs to have its MdiParent property set to the MDI form -- so you should add one more thing to that With block:
Code:
.MdiParent = Me
__________________
Erat autem fuenum multum in loco. -John 6:10
Please forgive my English -I'm a modern American.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
use of mdi
use of mdi
use of mdi use of mdi
use of mdi
use of mdi
use of mdi use of mdi use of mdi use of mdi use of mdi use of mdi use of mdi
use of mdi
use of mdi
 
use of mdi
use of mdi
 
-->