473,383 Members | 1,885 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,383 software developers and data experts.

Parent MDI and User Control Issue

Ian
I have a parent MDI with a menu that calls all the children forms and that
works fine. My issue is I created a user control that looks like a toolbar
and it has various windows controls on it and it will be used by all of the
children forms. So I put the user control right underneath the menu control
on the parent. Anytime I call a child form it fills the parent area
including the area that the user control resides in. So I see the user
control still but the beginning of the child form sits underneath the user
control and I can't see the top part. I tried fiddling with the
startposition and location and nothing seems to work so that the children
forms will fill the parent area from the end of the user control to the
bottom of the parent area.

Any suggestion would be appreciated.
Nov 22 '05 #1
1 2129
CMM
1) Set the user control's Dock property to top.

2) If you're trying to resize or position MDIChildren in code... it's
tricky... the trick is to get a reference to the magical "MDIClient" control
that is part of the MDIParent's controls collection and use its coordinates
as a reference point to layout your child windows. Do a search on Google for
MDI and MDIClient. If you get stuck I can post some code. It would be nice if
there was an equivalent to VB6's ScaleHeight/ScaleWidth properties
(GetClientRectangle doesn't cut it in a lot of circumstances).

"Ian" wrote:
I have a parent MDI with a menu that calls all the children forms and that
works fine. My issue is I created a user control that looks like a toolbar
and it has various windows controls on it and it will be used by all of the
children forms. So I put the user control right underneath the menu control
on the parent. Anytime I call a child form it fills the parent area
including the area that the user control resides in. So I see the user
control still but the beginning of the child form sits underneath the user
control and I can't see the top part. I tried fiddling with the
startposition and location and nothing seems to work so that the children
forms will fill the parent area from the end of the user control to the
bottom of the parent area.

Any suggestion would be appreciated.

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ian | last post by:
I have a parent MDI with a menu that calls all the children forms and that works fine. My issue is I created a user control that looks like a toolbar and it has various windows controls on it and...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
25
by: Steve Jorgensen | last post by:
Yup, Steve's full of tips, but hey, it makes him feel important, right? Ok, here goes. I've been trying to improve encapsulation by putting code in the same object as the stuff it affects, so I...
13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
3
by: David N | last post by:
Hi All, I just wonder if in C#, I can develop a user defined control that can call its parent function which is not yet developed. For example, how do I make my user control call a...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
1
by: Danny Ni | last post by:
Hi, I have a web form A that contains an user control B, which contains an user control C. Inside user control C, can I call methods in user control B and web form A? If yes, How? The mthods...
5
by: Steve Richter | last post by:
In my user control I want to read the ViewState dictionary of the Parent control. But this sensible idea is not permitted by the compiler: Compiler Error Message: CS1540: Cannot access...
5
by: Josh Nikle | last post by:
I have a webform containing a GridView control "GridView1" and usercontrol which is also a GridView "GridView2." I have a button column in the usercontrol. The code behind that button adds an...
5
by: gnewsgroup | last post by:
In my user control, I would like to find a Label control in the parent page (the page that uses my user control). I need to update that Label.Text when something happens in the user control. I...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.