Building multiple UserControls in a single assambly

  • Thread starter Thread starter Crirus
  • Start date Start date
C

Crirus

Hello

Right now I have 3 projects to my solution... 2 user controls and a tester
I need to embed both controls in a third one, and the final build to output
only one assambly..How can I do that?

Crirus
 
Hi Crirus,

Easy.

Create a new UC project. Open the toolbox. If you haven't already added
your other UCs to it, right-click and go for it. Then drag them both onto the
new UC.

Regards,
Fergus
 
And that assure me that dll's that make the 2 initial UC's will be compiled
embedded in the 3'th UC?
Right now, each project build it's own dll
 
Hi Crirus,

Sorry, I missed that bit about the assembly.

I've got a test project which has a Form, an outer container UC, an inner
container UC and a browser UC inside that. I dragged the files from each into
the Form's project and removed the UC Projects (without saving when it asked).
Then I deleted all the dlls.
..
When I rebuilt the Solution it complained at the points where I was
declaring and instantiating the UCs and so I deleted the namespace references
which were now redundant.

With them all cleared it worked - one exe file and no dlls.

Regards,
Fergus
 
* "Crirus said:
And that assure me that dll's that make the 2 initial UC's will be compiled
embedded in the 3'th UC?
Right now, each project build it's own dll

You will get three separate DLLs.
 
The only way?
How about if I make a single project and add all UC to it?
Can I make a reference of on in the other then? Like picking from ToolBox
and drawing on the UC's window?
 
* "Crirus said:
The only way?

If you want a single file, yes. You must link the files together after
they are compiled.

- or -

You add the usercontrols to the EXE project directly and compile it.
 
hmm, there is no exe involved...only a base UC that contain others... all
embedded in IE..that's why I need only one file with them
 
Hi Crirus,

Did you miss my last post? - I was reporting how I achieved exactly that.

Regards,
Fergus
 
Hi Fergus,
I dont have an exe.... only UC's
So, if I make a single project with all that UC's inside, can I draw one
onto the other's window somehow?
 
In VB 6 if I add multiple UC to the same project I can see them in ToolBox
and use them as a UC, on the other UC
How can this be achieved in NET?
 
Hi Crirus,

I only now what I know because I tried it in response to your query!

Sure, I pulled them all into the same exe. But I reckon I could have
stopped one level shorter and pulled all my UCs into one dll.

I reckon that the outermost will be the one that appears in the toolbox.
But then it may complain at having two or more UCs in one package.

It's just an avenue for exploration. ;-)

Regards,
Fergus
 
So there is no way to use UC's functionality only as a helper inside to a
UC?
That's make me angry ....:[

I'd like the old feature of VB 6 back... I really need one single dll from a
UC that act as a container for another UC's designed by me...
I need the window of that inner uc's and the mouse events

Crirus
 
Hi Crirus,

~~ So there is no way to use UC's functionality only as
~~ a helper inside to a UC?

I'm not saying that. I'm saying that it you <can> get them into a single
dll but <maybe> not onto the ToolBox. I haven't done it but I'm suggesting it
as something for you to explore.

~~ That's make me angry ....:[

Lol. Hold on a sec first. Have you tried it yet? If you try it and finds
it doesn't work, <then> you can get angry - plenty angry! ;-)

But then, even if you can't get the inner UC on the TooBox, you should be
able to get it onto your Form using code. Just a bit of extra work. All is not
lost yet.

Good luck.

Regards,
Fergus
 
Hi Crirus,

Funny? ROFL, Yep!!

And very good news too :-))

See you in some different threads...

Regards,
Fergus

ps. Fingers crossed that they are the latest version and not some left-overs
from previous experiments!
 
Hi
I tried...I never post a question before getting stuck or when I still have
a clue :)
I added 3 UC's to the same project but I cant see them In ToolBox...how to
add then by code as window into my UC?
I tried to full the IDE designer with a NET control and replace then with
mine in source, but they write resx file as well so...not a solution

quite mad >:{
Crirus
 
Hi again,
and for the lst time in this matter!

My very foult!!!

There is a tab on ToolBox named "My User Controls". there are grouped all
"My Custom Controls"
Is'nt this funny?

my appologise,

Crirus

Crirus said:
Hi
I tried...I never post a question before getting stuck or when I still have
a clue :)
I added 3 UC's to the same project but I cant see them In ToolBox...how to
add then by code as window into my UC?
I tried to full the IDE designer with a NET control and replace then with
mine in source, but they write resx file as well so...not a solution

quite mad >:{
Crirus



Fergus Cooney said:
Hi Crirus,

~~ So there is no way to use UC's functionality only as
~~ a helper inside to a UC?

I'm not saying that. I'm saying that it you <can> get them into a single
dll but <maybe> not onto the ToolBox. I haven't done it but I'm
suggesting
it
as something for you to explore.

~~ That's make me angry ....:[

Lol. Hold on a sec first. Have you tried it yet? If you try it and finds
it doesn't work, <then> you can get angry - plenty angry! ;-)

But then, even if you can't get the inner UC on the TooBox, you
should
be
able to get it onto your Form using code. Just a bit of extra work. All
is
not
lost yet.

Good luck.

Regards,
Fergus
 
Back
Top