Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / VB.Net Question - MDI Within a MDI

Author
Message
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 2nd Dec 2003 04:15
Not sure if there are any VB.Net Guru's around here but I'm asking anyway. I've got a bit of a tricky question that might not be possible to do.

Basically I would like to have a MDI Parent and then with one of the MDI Childs have another MDI child inside it. Doing this as one might expect will give the error: "A form cannot be both a MDI Parent and Child".

So does anyone know any workarounds, API calls? Anything at all that might allow me to do this? Cheers.


"Computers are useless they can only give you answers."
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 2nd Dec 2003 04:20
I never tried this but it may be possible in a slightly different way.

Make your true mdi parent, then make a child form with the parent set to the true mdi, then make another form and have the first true child form be the new form's parent or container

not sure tho.

-RUST-
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 2nd Dec 2003 09:08
You sort of just lost me there lol.

This is what I've done to create just a normal MDI Parent (Form1) with MDI Child (Form2):




Also, Form1's 'IsMdiContainer' property is set to True.

By 'True MDI Parent' do you mean just do it like I've said above or do you mean something else? Also, if I set Form2's 'IsMdiContainer' property to true it returns the error: "A form cannot be both a MDI Parent and Child".


"Computers are useless they can only give you answers."
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 2nd Dec 2003 16:31
I'll look into it and try and get back sometime later today...

-RUST-
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Dec 2003 00:55
sorry, I haven't rightfully researched this but I think you are correct in saying it can't be done, but I am not sure, and I hate saying "it can't be done" about anything. If I were you I would search then net for the topic, and you may wanna give http://www.planetsourcecode.com a look. Some very useful stuff up there.

-RUST-
JSN
20
Years of Service
User Offline
Joined: 8th Nov 2003
Location: 127.0.0.1
Posted: 3rd Dec 2003 01:42
Well I've been having ago and I really don't think it can be done.

I don't think you can say Window A is the parent, Window B is the child of A, but is also the Parent of C.

Though the question does remain, why would you want to do it this way?

-----

~ J ~
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 3rd Dec 2003 02:52
Quote: "sorry, I haven't rightfully researched this but I think you are correct in saying it can't be done, but I am not sure, and I hate saying "it can't be done" about anything. If I were you I would search then net for the topic, and you may wanna give http://www.planetsourcecode.com a look. Some very useful stuff up there."


Yeah, I've looked around the net quite a bit as well as checking PSC, I also posted in their 'Ask a Pro' section but after looking back over previous posts, their "Pro's" haven't answered a question in months.


Quote: "May I ask why you would want to do this ? Don't get me wrong, but I'm wondering if the design could be made a bit better to not require mdi's inside mdi's."


I'm not going to use it as an actual MDI inside of another MDI, essentially I just want to have one form stuck inside another which is part of an MDI. If you open a new project in VB6 then you can see what I want, an MDI interface and then the window/form inside it ("Project1 - Form1 (Form)") has another form stuck inside of it as well. I know the inner-most form isn't actually a form and is probably created in some other way but because I have no idea how they did that, the only way I can think of doing it so it retains unique themes/colours on each computer is by using an actual form.

Hope you understand what I'm aiming for now.


"Computers are useless they can only give you answers."
MicroMan
21
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 3rd Dec 2003 04:12
Actually, I just think it's a window. Not an MDI form at all, but a graphical simulation of an MDI form. The actual MDI form is the IDE itself, and it has this container window called Form1, which is the simulation.

As a simulation, it is of course subjected to the rules of the simulation, and those rules could be tailored to mimic and MDI form. I've had a bit of these considerations when I wanted to make a toolbar like the project window in the DBP IDE. I never wanted to make it independent per se, just that it should work under its own (the XP standard) rules.

Sorry if this seems vague, but I've just finished consuming a great dinner and about 1,5 litres of Pasqua wine with a good friend, and couldn't be relied on to make a thorough technical dissertation.

For what I think you want, you would have to have a standard form and to make everything private, and then make properties our of everything you want to access. If you make a property out of everything, then you can control the way that form behaves...

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----

Login to post a reply

Server time is: 2024-09-20 22:38:23
Your offset time is: 2024-09-20 22:38:23