Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using a form as MDIContainer - making clientsize smaller for MDI Childs

Posted on 2003-11-21
11
Medium Priority
?
465 Views
Last Modified: 2007-12-19
Hello,

I am unsing one form as MDI Container. I have an image on top of my form.

Now I have several other forms as MDIchilds.

If I set one MDIChild to maximize, its head has dissappeared under my Image and the whole window looks very strange. How can I make the clientsize in which the MDIchilds are allowed to move etc smaller? I don't want the MDIChilds in the whole MDIParent Form, just in a part of it, so I can see my image and move the mdichild under the image.

Can I do this !!without!! having to set all corrdinates and methods for each of my MDIchilds?

Thank you very much  
0
Comment
Question by:Firlefanz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
11 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 9796922
Maybe this sample can be useful for you:

http://www.freevbcode.com/ShowCode.ASP

Change splitter orientation to horizontal and fill top pane with the image instead of controls. I set MaxButton property in the child form to True and it behaves as needed.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9796929
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9796989
One more: splitter in this sample can be easily converted to fixed (non-resizable). Set MousePointer of picVBar to Default and comment line bDrag = True in picVBar_MouseDown.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Firlefanz
ID: 9797383
Okay, thanks for the idea. The only problem is here: When I maximize the MDIchild (I put the maximize box on it) and change the picturebox to horizontal over the wolhe forms width, and afterwards maximize the mdichild, the head (bar at to of the mdichild with minimize icon etc) is again over my banner (here the picturebox) and not under it!!

It is better, but still the mdichilds top-bar is over my banner!
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9797451
Cannot reproduce this behaviour. What do you mean "change the picturebox to horizontal over the whole forms width". Dynamically?  I assume that it is always horizontal, set in the form designer.
0
 

Author Comment

by:Firlefanz
ID: 9797817
In the sample there are some things to the left, and the mdichild is in the right half.
i changed it so it is in the under half, and the picturebox is above the mdichild.

when you maximize the mdichild then, the mdichildform itself is under the picturebox, but the bar on top
of the mdichildform is above the picturebox, not under it, like it should!

thanks for your interest and suggestions :)
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9798491
I continue to play with this sample ant here are the results:
1) Remove all controls from FRMMain except: menus, picVar and Status.
2) Set picVar alignment to AlignTop and place it in the top part of the window
3) I added also line control to the top part of AlignTop to see whether some part of it is obscured
4) Remove lines of code which are not compiled
5) Run the sample, open child form and maximize it.

I can see that title bar of the child form is above the picture box, however, picture box is not obscured and may show any image or animation without problems.
I will try something else and will return later.


0
 
LVL 4

Expert Comment

by:TigerZhao
ID: 9807840
To Firlefanz:
In VB, you can put a PictureBox on MDIForm to show some picture you want, and need not a "MDI Containter" to act this feature.
0
 

Author Comment

by:Firlefanz
ID: 9808773
@AlexFM: Thanks, this it okay like you told me, the only problem is I want that title bar UNDER the picturebox, then this would be ok! it would be even better if I could turn that title bar off, because I have own icons on the form and I want to hide the title bar. the only problem is that the title bar appears again, when I maximize the mdi child.

@TigerZhao: I know, thank you. I must use mdichilds for my program, this is the way the program has to look like, and I must make it this way. Has nothing to do with the picturebox, I only want to show some banner.
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 1500 total points
ID: 10162540
My answer give partial solution of the problem. Howerver, if Firlefanz wants his points back because there is no full solution, I have no objections.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question