|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MDI Parent FormsHello 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 henpat wrote:
> Hello all You could use ShowDialog:> 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 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. Thanks a lot.
It Works. <lord.zol***@gmail.com> escribió en el mensaje Show quoteHide quote news:1165424361.822475.278620@16g2000cwy.googlegroups.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. > 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. <lord.zol***@gmail.com> wrote in message Show quoteHide quote news:1165424361.822475.278620@16g2000cwy.googlegroups.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. > Martin wrote:
Show quoteHide quote > Hi, I don't have the code in front of me, but when I don't think I set a> > 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. 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. ;)
OLEDBCommand vs. SQLCommand
Using XPath Against A Node how to use table in a dataset as data source for combobox? HTML help files cUpdate Custom attribut with reflection Re: Which do you prefer? IE toolbar show/hide XML File into a SQL table how pass Date vaiable to XPath query DLL returns a variant data type - how to convert and use in VB .NET |
|||||||||||||||||||||||