Solved

Parent form from a component

Posted on 2003-12-08
7
934 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 69

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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 69

Author Comment

by:Éric Moreau
ID: 9993993
0
 
LVL 69

Author Comment

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

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now