By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,682 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,682 IT Pros & Developers. It's quick & easy.

Building multiple UserControls in a single assambly

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
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
Nov 20 '05 #2

P: n/a
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
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:OW**************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #3

P: n/a
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
Nov 20 '05 #4

P: n/a
* "Crirus" <Cr****@datagroup.ro> scripsit:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

P: n/a
* "Crirus" <Cr****@datagroup.ro> scripsit:
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?


<http://www.gotdotnet.com/community/usersamples/Default.aspx?query=illink>

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6

P: n/a
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?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "Crirus" <Cr****@datagroup.ro> scripsit:
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?


<http://www.gotdotnet.com/community/usersamples/Default.aspx?query=illink>

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #7

P: n/a
* "Crirus" <Cr****@datagroup.ro> scripsit:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #8

P: n/a

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

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "Crirus" <Cr****@datagroup.ro> scripsit:
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.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #9

P: n/a
Hi Crirus,

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

Regards,
Fergus
Nov 20 '05 #10

P: n/a
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?
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:ek**************@tk2msftngp13.phx.gbl...
Hi Crirus,

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

Nov 20 '05 #11

P: n/a
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?
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:ek**************@tk2msftngp13.phx.gbl...
Hi Crirus,

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

Nov 20 '05 #12

P: n/a
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
Nov 20 '05 #13

P: n/a

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
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:OG****************@tk2msftngp13.phx.gbl...
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

Nov 20 '05 #14

P: n/a
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
Nov 20 '05 #15

P: n/a
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" <fi******@tesco.net> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #16

P: n/a
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" <Cr****@hotmail.com> wrote in message
news:Ox**************@tk2msftngp13.phx.gbl...
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" <fi******@tesco.net> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
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


Nov 20 '05 #17

P: n/a
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!
Nov 20 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.