Windows Develop Bookmark and Share   
 index > Windows Forms General > Getting Control in Main Window
 

Getting Control in Main Window

I have a win app that as a ListBox control.

In the app, I load an Assembly through reflection. I would like that assembly to somehow have access to the ListBox in the main application. I DO NOT want to add the main app as a reference to the assembly.

How do i accomplish this?

Thanks,
Joshua
desertedroad  Thursday, October 01, 2009 8:49 AM

You can pass your control as a property or as a constructor parameterto the assembly.(Does assembly's codecan be modified by you?)

Since your control is reference typeyou can access your control via that property or variable.

Tamer Oz  Thursday, October 01, 2009 9:18 AM

You can pass your control as a property or as a constructor parameterto the assembly.(Does assembly's codecan be modified by you?)

Since your control is reference typeyou can access your control via that property or variable.

Tamer Oz  Thursday, October 01, 2009 9:18 AM
Yeah, that's what i'm doing right now. I didn't know if there was a "cleaner" way to do it.
desertedroad  Thursday, October 01, 2009 10:05 AM

You can use google to search for other answers

Custom Search

More Threads

• ToolStripControlHost has extra space to the right of the contained control
• Scroll Bar Problem
• how to create a system DSN for SQL Server in .NET
• Problem in configure Remote server and client
• C#.NET APP: How to bind a vscrollbar component to a control?
• How do you save a Word Doc file into an SQL Server 2000 Database?
• How to load .java file in a richtextbox.
• Best choice for a multi panel interface with Windows Forms
• How to make excel headers (first row) as DGV column headers
• Window Docking Handles