-
SetParent to a control???
Hi,
Well, I am working with some legacy code that does something I think is
weird. But I don't know whether this looks weird because it is a bad or
dangerous idea, or just because I never thought to do this.
We have an Explorer form that is used to display another form in the right
pane. These sub forms are also displayed on their own. Both the explorer
form and these subforms (which are sometimes normal forms) are MDI children.
A Videosoft elastic is used as the right pane in the explorer.
To supply the Explorer functionality, SetParent is used to set the parent of
the subform to the videosoft elastic. Under certain conditions, only proven
to occur in the IDE at this point, the subform loses the elastic as its
parent.
So, assuming I managed to explain this clearly, my questions are
1) Are there hazards or issues with setting the parent (using SetParent)
of a form to a control?
2) Any clue what might make the form lose its parent?
3) We have instability (IPFs) and resource leaks in this application. I
am assuming that we need to look elsewhere for these problems, but if you
think it could be related I would love to hear about it
4) Are there any problems with an MDI child's parent not being the
MDIForm
Thanks!!!
--
Kathleen
(MS-MVP)
Reply in the newsgroup so everyone can benefit
--
-
Re: SetParent to a control???
Hi Kathleen,
I've been looking for code to use forms that are in a ddl to set them as
MDIChildren of a main app. I've also detected weird behavior. If you would
like to click on the forms caption and drag it the from drops exactly down
a caption. After i stoppped dragging the form it jump up about a caption's
height.
There is an article in the MSDN that has been published in a VBPJ last year,
it deals with this kind of architecture, but instead of dll's it uses ocx's.
It is save to add controls to vb-form's runtime if you use the addcontrol
function on the form. Therefore they created a new empty form and added the
application(form) as a control to the form. After resising the control to
cover the complete window, it behaved like a normal form.
So good luck
"Kathleen Dollard-Joeris" <kjoeris@noemailplease.com> wrote:
>Hi,
>
>Well, I am working with some legacy code that does something I think is
>weird. But I don't know whether this looks weird because it is a bad or
>dangerous idea, or just because I never thought to do this.
>
>We have an Explorer form that is used to display another form in the right
>pane. These sub forms are also displayed on their own. Both the explorer
>form and these subforms (which are sometimes normal forms) are MDI children.
>A Videosoft elastic is used as the right pane in the explorer.
>
>To supply the Explorer functionality, SetParent is used to set the parent
of
>the subform to the videosoft elastic. Under certain conditions, only proven
>to occur in the IDE at this point, the subform loses the elastic as its
>parent.
>
>So, assuming I managed to explain this clearly, my questions are
>
> 1) Are there hazards or issues with setting the parent (using SetParent)
>of a form to a control?
>
> 2) Any clue what might make the form lose its parent?
>
> 3) We have instability (IPFs) and resource leaks in this application.
I
>am assuming that we need to look elsewhere for these problems, but if you
>think it could be related I would love to hear about it
>
> 4) Are there any problems with an MDI child's parent not being the
>MDIForm
>
>Thanks!!!
>
>--
>Kathleen
>(MS-MVP)
>Reply in the newsgroup so everyone can benefit
>--
>
>
-
Re: SetParent to a control???
Hi Kathleen,
I've been looking for code to use forms that are in a ddl to set them as
MDIChildren of a main app. I've also detected weird behavior. If you would
like to click on the forms caption and drag it the from drops exactly down
a caption. After i stoppped dragging the form it jump up about a caption's
height.
There is an article in the MSDN that has been published in a VBPJ last year,
it deals with this kind of architecture, but instead of dll's it uses ocx's.
It is save to add controls to vb-form's runtime if you use the addcontrol
function on the form. Therefore they created a new empty form and added the
application(form) as a control to the form. After resising the control to
cover the complete window, it behaved like a normal form.
So good luck
"Kathleen Dollard-Joeris" <kjoeris@noemailplease.com> wrote:
>Hi,
>
>Well, I am working with some legacy code that does something I think is
>weird. But I don't know whether this looks weird because it is a bad or
>dangerous idea, or just because I never thought to do this.
>
>We have an Explorer form that is used to display another form in the right
>pane. These sub forms are also displayed on their own. Both the explorer
>form and these subforms (which are sometimes normal forms) are MDI children.
>A Videosoft elastic is used as the right pane in the explorer.
>
>To supply the Explorer functionality, SetParent is used to set the parent
of
>the subform to the videosoft elastic. Under certain conditions, only proven
>to occur in the IDE at this point, the subform loses the elastic as its
>parent.
>
>So, assuming I managed to explain this clearly, my questions are
>
> 1) Are there hazards or issues with setting the parent (using SetParent)
>of a form to a control?
>
> 2) Any clue what might make the form lose its parent?
>
> 3) We have instability (IPFs) and resource leaks in this application.
I
>am assuming that we need to look elsewhere for these problems, but if you
>think it could be related I would love to hear about it
>
> 4) Are there any problems with an MDI child's parent not being the
>MDIForm
>
>Thanks!!!
>
>--
>Kathleen
>(MS-MVP)
>Reply in the newsgroup so everyone can benefit
>--
>
>
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks