WindowsControlLibrary vs ClassLibrary

R

Rene

I notice that VS lets you choose to create a WindowsControlLibrary and
ClassLibrary, I created a class library and then added a user control and it
let me do that. I am assuming that the opposite will work too.



So why tow projects types when it appears you can do the same thing in both
of the? Is there something that one is callable of doing and the other is
not?



Thanks
 
N

Nurchi BECHED

You see, the WindowsControlLibrary is nothing but a normal class
(just as any other, lol) that extends a certain class.
Just like the windows form class, you can write it up from a scratch
just type:
<code>
public class form1
{
//and do something here
}
</code>

now, if you extend System.Windows.Forms.Form:
<code>
public class form1:System.Windows.Forms.Form
{
//and do something here
}
</code>
you will be able to edit the form in the form designer.

WindowsControlLibrary is a class that you can "put" on your
form. Class library is just (pretty much) a set of functions.
They can be static or instance, etc, but the point is, that
ClassLibrary "does something" whereas WindowsControlLibrary
shows up on the screen AND does something.

I hope, this helps.
Have a good one.

I notice that VS lets you choose to create a WindowsControlLibrary and
ClassLibrary, I created a class library and then added a user control
and it
let me do that. I am assuming that the opposite will work too.



So why tow projects types when it appears you can do the same thing in
both
of the? Is there something that one is callable of doing and the other is
not?



Thanks



--
Regards,
Nurchi BECHED

P.S.
C makes it easy to shoot yourself in the foot;
C++ makes it harder, but when you do,
it blows away your whole leg."
--Bjarne Stroustrup
 
S

sadhu

I guess it's just an IDE addition. Choosing Windows Control Library
creates a user control automatically and opens the Forms Editor window
for you.

Regards
Senthil
 
S

Sean Hederman

Plus the automatic references are slightly different when the project is
first created. Class Library doesn't have System.Window.Forms or
System.Drawing. In VB.NET the automatic Imports are also slightly different.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top