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

MDI Parent Forms

Hello all
I have a MDI Parent Form with some childs.
I need to know how can I setup a child form in order to disable access for
other forms "in the back".
I need that only the active form be available until the user closes it.

Thanks a lot.
henpat
Dec 6 '06 #1
4 1928

henpat wrote:
Hello all
I have a MDI Parent Form with some childs.
I need to know how can I setup a child form in order to disable access for
other forms "in the back".
I need that only the active form be available until the user closes it.

Thanks a lot.
henpat
You could use ShowDialog:

MyModalForm.ShowDialog(MyMDIParentForm)

The modal form won't be a true MDI child (I don't think, but I've never
properly checked), but it works fine for me in similar situations, and
it still makes the MDI parent form the owner of the modal form.

Dec 6 '06 #2
Thanks a lot.
It Works.

<lo*********@gmail.comescribió en el mensaje
news:11**********************@16g2000cwy.googlegro ups.com...
>
henpat wrote:
>Hello all
I have a MDI Parent Form with some childs.
I need to know how can I setup a child form in order to disable access
for
other forms "in the back".
I need that only the active form be available until the user closes it.

Thanks a lot.
henpat

You could use ShowDialog:

MyModalForm.ShowDialog(MyMDIParentForm)

The modal form won't be a true MDI child (I don't think, but I've never
properly checked), but it works fine for me in similar situations, and
it still makes the MDI parent form the owner of the modal form.

Dec 7 '06 #3
Hi,

I tried this as I would like something similar in my program under certain
circumstances, but if I set the MDIParent property of the child form to my
MDI form, when I call ShowDialog(MDIForm) I get an error:
----------------------------------------------------------------------------
Form that is not a top-level form cannot be displayed as a modal dialog box.
Remove the form from any parent form before calling showDialog.
----------------------------------------------------------------------------

If I do not set the MDIParent property then the modal form isn't contained
within the MDI form and that rather defeats the object of using an MDI
container form.

Have I missed something obvious or is this what you mean by 'The modal form
won't be a true MDI child '?

Thanks,

Martin.

<lo*********@gmail.comwrote in message
news:11**********************@16g2000cwy.googlegro ups.com...
>
henpat wrote:
>Hello all
I have a MDI Parent Form with some childs.
I need to know how can I setup a child form in order to disable access
for
other forms "in the back".
I need that only the active form be available until the user closes it.

Thanks a lot.
henpat

You could use ShowDialog:

MyModalForm.ShowDialog(MyMDIParentForm)

The modal form won't be a true MDI child (I don't think, but I've never
properly checked), but it works fine for me in similar situations, and
it still makes the MDI parent form the owner of the modal form.

Dec 7 '06 #4

Martin wrote:
Hi,

I tried this as I would like something similar in my program under certain
circumstances, but if I set the MDIParent property of the child form to my
MDI form, when I call ShowDialog(MDIForm) I get an error:
----------------------------------------------------------------------------
Form that is not a top-level form cannot be displayed as a modal dialog box.
Remove the form from any parent form before calling showDialog.
----------------------------------------------------------------------------

If I do not set the MDIParent property then the modal form isn't contained
within the MDI form and that rather defeats the object of using an MDI
container form.

Have I missed something obvious or is this what you mean by 'The modal form
won't be a true MDI child '?

Thanks,

Martin.
I don't have the code in front of me, but when I don't think I set a
MDIParent for the modal dialogue. I think I just set the MDIParent as
the Owner of the form, but did not set it as the MDIParent. So yeah , I
guess the modal form won't be a "true MDIChild" form. For me this
kludge works fine. If you can get the child form to be a True MDIChild
AND modal, I'd be interested to know how. ;)

Dec 7 '06 #5

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

Similar topics

11
by: HolaGoogle | last post by:
Hi, Sorrryy to ask such basic question but i do need your help! Here's what i'm trying to do: In my parent form i'm calling a my Iframe form to get certain value, then depending on that value...
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...
6
by: Claus Holm | last post by:
I'm trying to enable a menuitem in the parent form from a mdichild. Rather than making the menuitems public, I'd go for a public method in the parent form to do the change, but when I call the...
3
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI...
2
by: Jim Shank | last post by:
I am really trying to find the best OOP way of doing this. I have a parent MDI form with multiple children and I am trying to communicate variables between them. I have been able to successfully...
6
by: Edwinah63 | last post by:
Hi everyone, could someone give me some thoughts on the best way to manage mdi parent and child forms? in vb6 i could scroll through the forms collection and determine which forms were...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
1
by: nupuragr82 | last post by:
I have a parent form and on button click I am calling a child page where i have a textbox and a button. On button click of child form I am passing the value of the Textbox to the Textbox in parent...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.