Solved

Parent form from a component

Posted on 2003-12-08
7
937 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
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…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 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