Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 630211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:49:51+00:00 2026-05-13T19:49:51+00:00

my project is written in c#. I have a usercontrol that I’ve designed. In

  • 0

my project is written in c#. I have a usercontrol that I’ve designed. In that usercontrol I want the ability to look through the form the control is placed on using reflection to look at all other controls on the form.

How can I go about doing this? I’ve used reflection to go through dll’s but not for something like this.

in summary: My usercontrol is placed on a form, I want my usercontrol to onLoad look through all other controls on the form (sometimes i’ll want to limit it to same container and not entire form but I can figure that out later).

I’m also open to ideas that dont use reflection if anyone has any.

thanks!

EDIT:

So i tried simply looking through the parent controls and that didnt work for what im trying to do, which is my fault for badly explaining it above.

Let me give some more details.

I know that on the main form there will be a ContainerListView control, now when you add columns to the containerlistview ContainerListviewColumnHeaders’s are created. Their declarations show up in the initalizeComponent() for the form. What I want to do is in my usercontrol I want to look at the form and find all of the ContainerListViewColumnHeader’s, however since they are not of type ‘Control’ (they are ‘Component’) they dont show up in the previous method.
Interrogating the Containerlistview is not an option.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:49:51+00:00Added an answer on May 13, 2026 at 7:49 pm

    No need for reflection.

    Just look at UserControl.ParentForm – this is the Form that’s hosting the UserControl. From there, you can iterate (recursively) through Form.Controls.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we have a project written in Delphi that we want to convert to C#.
I have a java project written using eclipse ide and I want to run
I'm writing unit tests for a project (written in PHP, using PHPUnit) that have
We have a updatable web site project that is written in c#, it has
I have an old personal project written in Java 1.4 that I am porting
I have a project written in Django. All fields that are supposed to store
I have a project written in C that originally was being done on Linux,
I have a project written with zend framework. I was using xampp for my
I have to work on this project written using Zend Framework. This is a
I work on a project written for MSVCC / Windows, that I have to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.