![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re Usable components hi i want to make classes and components that i can re-use in developing applications seems that just compiling and adding a referance of the dll to my projects is not enough to let me use the classes inside them so haw can that be done ? and whats the difference between class and component ? i mean what shall i do with the component user interface since i wont put controls and text boxes on it ? -- Ammar S. Mitoori IT Head QIMCO Co. Tel : +9744831199 Mobile : +9745378400 Fax : +9744831643 |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Re Usable components >and adding a referance of the dll to my projects is not enough It should be... are the classes declared public? Also - do you mean via code, or via the GUI designer? If the latter you might need to use the "Choose Items..." option on the toolbox to make them visible. Marc |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Re Usable components hi thank you for yor answer but i dont see any relation with my question ![]() -- Ammar S. Mitoori IT Head QIMCO Co. Tel : +9744831199 Mobile : +9745378400 Fax : +9744831643 "Marc Gravell" wrote: Quote: Quote: > >and adding a referance of the dll to my projects is not enough > It should be... are the classes declared public? > Also - do you mean via code, or via the GUI designer? If the latter you > might need to use the "Choose Items..." option on the toolbox to make > them visible. > > Marc > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Re Usable components > thank you for yor answer but i dont see any relation with my question ![]() In what sense? You are saying that adding a reference isn't enough... well, the fact is: it is! If it isn't working, then either the classes are internal (in which case you need to make them public), or you are talking about the designer, which has a separate list of what it displays. If you having a more specific error (i.e. more than you simply can't find the classes), then post the error! Marc |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Re Usable components i choosed new project then class library type, add some public class and complied it to a dll, then added a referance to that dll in another project is that enough ? i dont know what you mean by saying making the class public ? i defined it as public but is there another thing i should do ? -- Ammar S. Mitoori IT Head QIMCO Co. Tel : +9744831199 Mobile : +9745378400 Fax : +9744831643 "Marc Gravell" wrote: Quote: Quote: > > thank you for yor answer but i dont see any relation with my question ![]() > In what sense? You are saying that adding a reference isn't enough... > well, the fact is: it is! If it isn't working, then either the classes > are internal (in which case you need to make them public), or you are > talking about the designer, which has a separate list of what it displays. > > If you having a more specific error (i.e. more than you simply can't > find the classes), then post the error! > > Marc > |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Re Usable components > i defined it as public That should be enough. You should now be able to find the class (with the requisite namespace declarations). For example, the class might be ClassLibrary1.Class1 - in which case either add "using ClassLibrary1", or use the explicit ClassLibrary1.Class1 syntax (obviously the names will vary!). Marc |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Re Usable components you mean just public class end class and thas it > cuz that didnt wok with me ? -- Ammar S. Mitoori IT Head QIMCO Co. Tel : +9744831199 Mobile : +9745378400 Fax : +9744831643 "Marc Gravell" wrote: Quote: Quote: > > i defined it as public > That should be enough. You should now be able to find the class (with > the requisite namespace declarations). For example, the class might be > ClassLibrary1.Class1 - in which case either add "using ClassLibrary1", > or use the explicit ClassLibrary1.Class1 syntax (obviously the names > will vary!). > > Marc > |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Re Usable components > public class Quote: > > end class public class Foo {} should work; then after adding a reference you should be able to use Foo foo = new Foo(); etc in the second project. Marc |
My System Specs![]() |
| | #9 (permalink) |
| | Re: Re Usable components Oops; just realised this is "dotnet.general", not C#, so ignore the last comment ;-p But are you *sure* you are adding the reference? Marc |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| No usable video from DVDs | Vista music pictures video | |||
| Usable on 800 x 600? | Live Mail | |||
| making the WLM interface more usable | Live Mail | |||
| Pre SP Product key usable with SP1 new install ??? | Vista General | |||
| Deleted files still usable by app | Vista General | |||