473,379 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

MDI Form VB.Net in Visual Studio 2005

I'm trying to create a new app in MDI but I cant seem to get the children correct. The farthest I got was setting the IsMDIContainer to True. How would I proceed? Also, I have my own menu bar on the left side of the window with buttons that should lead to the children. My menu bar keeps the focus when I try to open other windows. Please advise.
Aug 14 '08 #1
1 1910
Curtis Rutland
3,256 Expert 2GB
You set the parent's IsMDIContainer to true, not the child's.

Set the child's MDIParent = to an instance of the mdi parent form.

What I usually do is modify the constructor to take a parameter of the type that your mdi parent is. For example, if you named the parent's class myMdiParent, then the child's constructor should look like this:
Expand|Select|Wrap|Line Numbers
  1. 'in myMdiChild
  2. Public Sub New(myMdiParent parent)
  3. {
  4.   Me.MDIParent = parent
  5. }
  6.  
And you can instantiate this form like this
Expand|Select|Wrap|Line Numbers
  1. 'somewhere in myMdiParent
  2. Dim child As New myMdiChild(me)
  3. child.Show()
  4.  
Just replace myMdiChild and myMdiParent with the proper class names.

I can't remember off the top of my head how to merge menu bars, but I'll dig up one of my old apps and find it tomorrow.

Hope that helps
I haven't tested this code (I usually work in C#)
Aug 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Shapper | last post by:
Hello, I am starting 2 new projects to deliver in January 2006. I want to create them in Asp.Net 2.0 using Visual Studio 2005. All my clients web sites are Visual Studio 2003 projects in...
3
by: Crazy Cat | last post by:
Hi, I'm developing an application that is basically a VB.NET front end to a SQL Server Express 2005 database -- right now I'm using VB.NET 2005 Express until my MSDN subscription gets delivered...
5
by: hfk0 | last post by:
Hi, I'm new to ASP.net, SQL Server and visual studio.net, and I'm having problem inserting and storing data from a web form to a SQL database. I created a simple ASP.NET web form, a simple SQL...
2
by: Progman | last post by:
I have Visual Studio 2005 Standard edition. Is ti the same thing as the Express edition or Standard is more?
3
by: akowald | last post by:
There's another topic like this but the code posted is in VB.NET. Well I need some help detecting mouse clicks outside the form. An event handler would be great but I can work with anything. ...
12
by: Nathan Sokalski | last post by:
I recently upgraded to from Visual Studio .NET 2003 to Visual Studio .NET 2005. In Visual Studio .NET 2003 when I would select 'Build' it would add a *.dll with the name of the Project to a /bin/...
0
by: Parasyke | last post by:
I have a form that I'm trying to get to work in VB.net (Standard). I have a DataGrid and Two Buttons (One for Loading an XML file and another for Updating the file with the changes I make to the...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
2
by: Peter | last post by:
Hi I've discovered a bizarre Windows Forms (VB.NET) behavior that is resulting in a Form not being able to be moved. To reproduce this: 1) Create yourself a new Windows Application in Visual...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.