So I'm new to VB.net, but not to VB. In VB6 you had the ability to create ActiveX objects that you could use in future programs. I have noticed though, that this feature is not available in .net. My guess would be that it was removed because .net is now completely Object Oriented.
The question, how do create the equal to an ActiveX object in .net? Lets pretend I'm making a board game... and I want the Board to be it's own control as it's used in both the game and the Map Editor. In VB6, I would create a Board ActiveX object and import it into both projects. How do I acheive the same results in .Net without the use of ActiveX Controls?
Comments
:
: The question, how do create the equal to an ActiveX object in .net? Lets pretend I'm making a board game... and I want the Board to be it's own control as it's used in both the game and the Map Editor. In VB6, I would create a Board ActiveX object and import it into both projects. How do I acheive the same results in .Net without the use of ActiveX Controls?
:
Research leads me to believe that you use a Control Template on the New Project page. Yet I don't have this... nor do I have the Class Template either. Are these things only available in the pro version?
: :
: : The question, how do create the equal to an ActiveX object in .net? Lets pretend I'm making a board game... and I want the Board to be it's own control as it's used in both the game and the Map Editor. In VB6, I would create a Board ActiveX object and import it into both projects. How do I acheive the same results in .Net without the use of ActiveX Controls?
: :
:
: Research leads me to believe that you use a Control Template on the New Project page. Yet I don't have this... nor do I have the Class Template either. Are these things only available in the pro version?
:
It is no big deal, the templates dont make much different. Basically you write just a class file and derive your control from either:
[code]
System.ComponentModel.Component
[/code]
- or -
[code]
System.Windows.Forms.Control
[/code]
Derive from the first class, if your control has no rendering logic or user interface, but you still want to be able to drag it onto a Windows form surface.
The latter class provides the basic functionality for rendering a control that you can see.
[code]
Public Class MyControl
Inherits System.Windows.Forms.Control
End Class
[/code]
You may want to look through http://www.windowsforms.com/ and see if you find articles on the subject, since it is pretty exaustive.
: :
: : The question, how do create the equal to an ActiveX object in .net? Lets pretend I'm making a board game... and I want the Board to be it's own control as it's used in both the game and the Map Editor. In VB6, I would create a Board ActiveX object and import it into both projects. How do I acheive the same results in .Net without the use of ActiveX Controls?
: :
:
: Research leads me to believe that you use a Control Template on the New Project page. Yet I don't have this... nor do I have the Class Template either. Are these things only available in the pro version?
:
Download and install newprojects.zip from:
http://home.columbus.rr.com/sjstover/newprojects.zip
This will add templates for Class Library and Windows Control Library to VS 2003. Just follow the instructions in the ReadMe.txt. Enjoy!