Solved

Parent form from a component

Posted on 2003-12-08
7
936 Views
Last Modified: 2010-05-18
When you design a new component in VB.Net, how can the component know by itself (without having to feed a property) on which form the component is hosted?
0
Comment
Question by:Éric Moreau
  • 4
7 Comments
 
LVL 5

Expert Comment

by:arvindb1
ID: 9902259
In your component you can say me.Parentform

or in the form where you are hosting it say

ControlName.ParentForm
0
 

Expert Comment

by:Azmodan
ID: 9902598
A component that inherits from the Control class, has the Parent property that refers to the container.
A component must inherit Control if you want to use Controls.Add method.
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 9993479
I didn't had time to return to this project. Sorry.

My component inherits from System.ComponentModel.Component and is to be hosted into the component tray (at the same place a timer component is hosted). How can I know the form that is hosting this component?

ParentForm is not existing for components.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 70

Author Comment

by:Éric Moreau
ID: 9993993
0
 
LVL 70

Author Comment

by:Éric Moreau
ID: 9993994
Anyone has this in VB.Net?
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 0 total points
ID: 10200302
I have found my answer (while I was not searching for it): http://www.code-magazine.com/Article.aspx?quickid=0401091
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question