Home > Archive > Visual Basic > May 2004 > MDIChild wanted for good home
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
MDIChild wanted for good home
|
|
| Robert Chafer 2004-05-28, 5:30 pm |
|
I have two apps one is a non-MDI app that has a window for each doc it
is editing. I have another app that uses MDI. I would like to be able
to integrate the non-MDI app into the MDI app (and still be able to
ship two apps). MDIChild is read only at run-time so I cannot just
set the flag as desired in the appropriate app.
A couple of solutions spring to mind
Make a copy of the non-MDI form and work with that...becomes a support
problem though when making changes.
Have two forms with exactly the same controls. Have events that
directly call a class that actually does the hard work. Would mean a
lot of chanes though
Any other ideas?
Robert Chafer
| |
| Larry Rebich 2004-05-28, 9:30 pm |
| Robert:
I don't understand your question exactly. You can have non-child and child
forms in the same application. If a child form is loaded it automatically
loads the mdi form. If no child form is loaded the mdi form will not
automatically be loaded. So in a Public Sub Main routine you could control
which form gets loaded. Set the 'startup object' to Sub Main in general
project properties. There is a sample of using mdi, child and non-child
forms in the following tip:
I wrote a tip of the month that I call Location, Location, Location. Link to
http://www.buygold.net/tips then look for the September 1998 tip of the
month. A sample program is provided. From the tip's intro:
This tip-of-the-month gathers into one module, functions and subroutines
that set a window's location, build a form's Window menu, allow users to
size a window using standard resolution settings [800x600, etc.] and arrange
MDI child forms. If any, the initial window location information is
retrieved from the registry. Location information is stored in the registry
when the form is unloaded.
Cheers,
Larry Rebich
More tips link to:
http://www.buygold.net/tips
Please:
No personal e-mail questions :-)
"Robert Chafer" <rob@silverfrost.come> wrote in message
news:bd7fb0d5ml7rjlpc9kteut819705t0cgj6@
4ax.com...
>
> I have two apps one is a non-MDI app that has a window for each doc it
> is editing. I have another app that uses MDI. I would like to be able
> to integrate the non-MDI app into the MDI app (and still be able to
> ship two apps). MDIChild is read only at run-time so I cannot just
> set the flag as desired in the appropriate app.
>
> A couple of solutions spring to mind
>
> Make a copy of the non-MDI form and work with that...becomes a support
> problem though when making changes.
>
> Have two forms with exactly the same controls. Have events that
> directly call a class that actually does the hard work. Would mean a
> lot of chanes though
>
> Any other ideas?
>
> Robert Chafer
| |
| Robert Chafer 2004-05-29, 7:30 am |
| Larry
Thank you for your input. I have just had a look around your site and
bookmarked it for future reference, there is some good info in there.
The problem I have is not just using my non-MDI form -- I can do that,
just load them and use them separate to the MDI parent. The problem is
making the regular non-MDI form appear as if it was part of the MDI
app -- i.e. as an MDIChild window.
"Larry Rebich" <lrebich_nospam@earthlink.net> wrote:
> Robert:
>
> I don't understand your question exactly. You can have non-child and child
> forms in the same application. If a child form is loaded it automatically
> loads the mdi form. If no child form is loaded the mdi form will not
> automatically be loaded. So in a Public Sub Main routine you could control
> which form gets loaded. Set the 'startup object' to Sub Main in general
> project properties. There is a sample of using mdi, child and non-child
> forms in the following tip:
>
> I wrote a tip of the month that I call Location, Location, Location. Link to
> http://www.buygold.net/tips then look for the September 1998 tip of the
> month. A sample program is provided. From the tip's intro:
>
> This tip-of-the-month gathers into one module, functions and subroutines
> that set a window's location, build a form's Window menu, allow users to
> size a window using standard resolution settings [800x600, etc.] and arrange
> MDI child forms. If any, the initial window location information is
> retrieved from the registry. Location information is stored in the registry
> when the form is unloaded.
>
> Cheers,
> Larry Rebich
>
> More tips link to:
> http://www.buygold.net/tips
>
> Please:
> No personal e-mail questions :-)
>
> "Robert Chafer" <rob@silverfrost.come> wrote in message
> news:bd7fb0d5ml7rjlpc9kteut819705t0cgj6@
4ax.com...
>
Robert Chafer
| |
| Rick Rothstein 2004-05-29, 11:30 am |
| > > > I have two apps one is a non-MDI app that has a window for each
doc it
able[color=darkred]
to[color=darkred]
just[color=darkred]
>
> Thank you for your input. I have just had a look around your site and
> bookmarked it for future reference, there is some good info in there.
>
> The problem I have is not just using my non-MDI form -- I can do that,
> just load them and use them separate to the MDI parent. The problem is
> making the regular non-MDI form appear as if it was part of the MDI
> app -- i.e. as an MDIChild window.
I'm still not completely clear on what you want to do. Are you saying
you have a form that in some projects you want to use it as a
non-MDIChild and in other projects you want to use it as an MDIChild? If
that is what you are saying, I think you can save your form to the
Template directory in VB after which it will be offered to you as a Form
to select when adding a form to a project. After you select and add a
form from that location, you can change its MDIChild property without
affecting the original form stored in your Template directory.
Rick - MVP
| |
| Robert Chafer 2004-05-30, 7:30 pm |
| The template approach looks interesting, I'll give it some more
thought.
"Rick Rothstein" <rickNOSPAMnews@NOSPAMcomcast.net> wrote:
> doc it
> able
> to
> just
>
> I'm still not completely clear on what you want to do. Are you saying
> you have a form that in some projects you want to use it as a
> non-MDIChild and in other projects you want to use it as an MDIChild? If
> that is what you are saying, I think you can save your form to the
> Template directory in VB after which it will be offered to you as a Form
> to select when adding a form to a project. After you select and add a
> form from that location, you can change its MDIChild property without
> affecting the original form stored in your Template directory.
>
> Rick - MVP
Robert Chafer
|
|
|
|
|