|
-
Nov 18th, 2002, 10:34 AM
#1
Thread Starter
Lively Member
MDI and child forms
Can anyone help with this problem? I am using VB6.
I have a project that runs with the MDI form set to run maximized (windowstate = 2).
Child form A is also set to run maximized (windowstate = 2).
Child form B is set to run normal (windowstate = 0).
Run project - MDI is maximised - OK. Show form A and that is maximised - OK.
Show form B and that is also OK (both forms now shown on the MDI).
Problem: Now that form B is shown, form A now changes to normal(windowstate 0) like form B.
Am I going loopy or what?
Thanks,
Steve.
-
Nov 18th, 2002, 10:36 AM
#2
Fanatic Member
that's one of the silly things about MDI forms - all child forms have the same windowstate. either they're all maximized, or all normal.
-
Nov 18th, 2002, 10:40 AM
#3
Thread Starter
Lively Member
Thanks for that, should have guessed there would be a simple answer.
Cheers.
-
Nov 18th, 2002, 10:50 AM
#4
Re: MDI and child forms
Originally posted by Steve Cain
Can anyone help with this problem? I am using VB6.
I have a project that runs with the MDI form set to run maximized (windowstate = 2).
Child form A is also set to run maximized (windowstate = 2).
Child form B is set to run normal (windowstate = 0).
Run project - MDI is maximised - OK. Show form A and that is maximised - OK.
Show form B and that is also OK (both forms now shown on the MDI).
Problem: Now that form B is shown, form A now changes to normal(windowstate 0) like form B.
Am I going loopy or what?
Thanks,
Steve.
you could also use a non child form and using the setparent api function you could make that non child window appear to be a child window... basically it will be contained within the MDI form like a child... but not act like an MDI child form.. great for doing what it sounds like you are working with
-
Nov 18th, 2002, 10:54 AM
#5
Fanatic Member
the only problem i have with that is that when the child form gets focus, the MDI form loses focus, which looks odd.
-
Nov 18th, 2002, 10:55 AM
#6
Thread Starter
Lively Member
Thanks Matt, sounds like a good work around.
-
Nov 18th, 2002, 10:59 AM
#7
Originally posted by tr0n
the only problem i have with that is that when the child form gets focus, the MDI form loses focus, which looks odd.
true... but it still does the trick none the less if it is needed.
-
Nov 18th, 2002, 11:02 AM
#8
Hyperactive Member
You could also set the desired window state at the activate event of each form. Not exactly what you're looking for, but each form that has the focus would have the correct state.
-
Nov 18th, 2002, 12:30 PM
#9
Don't use MDI forms! MS only put them in VB to piss developers off!
Arrrrrrrrrrrrrrrrrggggggggggggghghhhhhhhhhhhhhhhh!!!

Woka
-
Nov 18th, 2002, 12:47 PM
#10
Why not use? MDI forms are great I use them in my app and working fine this far.
I just wonder, is it possible to place a form on MDI form so that it's not in the child form area? I mean, could it be there like a picturebox that is set on the MDI form?
-
Nov 18th, 2002, 12:58 PM
#11
MDI Forms are great if they are used correctly. Only about 1% of applications require MDI forms. MDI forms are designed to be used for an application that has many of the same form open, ie Word, you can have loads of word docs open, and the MDI form controls them. If you have many different forms that open then MDI forms should NOT be used. they cause far too many problems than people expect. Trust me on that one 
i just add the above to my signiture since I keep quoting it everywhere hahaha.
Errr...what do you mean about a picture box?
You can have a form that is not an MDI child and open that and it will appear outside of the MDI form...
Woka
-
Nov 18th, 2002, 01:02 PM
#12
The MDI environment has it's place, but it should be weighed heavily. In some cases it makes sense, and in others it doesn't. In our app, because of the design, it made sense. We have an MDI form w/ an "Outlook"-style navigation bar (dynamically loaded based on the user's permission settings). As they click on the icon a form opens with the proper screen on it (each screen was created as an ActiveX control
When we move to .NET, using the MDI may not make sense, and we'll probably come up w/ some other setup.
I agree that MDI should be avoided at all costs, but sometimes.......
-
Nov 18th, 2002, 01:03 PM
#13
Yeah, the program of mine is an advanced text-editor 
I mean: normal MDIchild appears in the dark-grey area of the form. I'd like the form appear in the edgepart of the MDI form. Like if it was a toolbar, picturebox or a statusbar set on the MDI form itself.
Just a nice little trick I'd like to try out
-
Nov 19th, 2002, 08:50 AM
#14
Thread Starter
Lively Member
Thanks guys for the comments and help, I think I've got a clear picture now. Anothe issue that I now have is that if I open up a child form (normal - 0) windowstate and that form is fairly large (19000 x 14000 twips) then it does not open to its full size. The right side and bottom are cut off. There are no scroll bars, but I can drag the bottom-right corner to reveal the full form or I can maximise the form.
Steve.
-
Nov 19th, 2002, 08:55 AM
#15
Techgnome...er....fair enough, very strange way of doing it though.
Stevie Cain...Theif! You stole Martin Liss's avatar hahahahaha
Woka (would be VERY unhappy if someone stole his avatar)
-
Nov 19th, 2002, 10:08 AM
#16
Thread Starter
Lively Member
I've had the image on my PC for years, not sure where I got it but it was freely available in the public domain and I have seen it used on many web-sites.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|