• Modules andCtass Modules ‘
• lulling ClassModules~
• l’rnp1ementing properties and methods
• Raising Events from within Clas$es
• Creating and using,object variables
• Registering ActlveX components
• Handling Class errors
In the last chapter, you learned how to contact server applications an~ program (or OLE automate) them through the objects they expose. In thi chapter, you’ll learn ho to build your own OLE server applications, or ActiveX compo ents. An ActiveX component is a general term that encompasses three types of projects (perhaps more in the future): ActiveX DLLs, ActiveX E,(Es, and ActiveX
controls. In this chapter, you’ll learn how to build code components (ActiveX DLLs J and ActiveX EXEs), which ~ server applications that expose their functionality through an interface consisting of properties, methods. and events .
In the following chapter, you’ll learn how to create your own custom ActiveX controls, which can be added to any project’s Toolbox and used by developers in building user interfaces. In Chapter 20, you’ll See how custom ActiveX controls
can be used on Web pages.
The main differences between ActiveX controls and code components lie in their interface and integration into the Visual Basic IDE. Activex controls are integrated into the Visual Basic IDE and they have a visible interface. While code components provide a functionality similar to that of ActiveX controls, they aren’t as integrated with the development environment (e.g., you can’t drop a code component on a Form like you can with a control), and they don’t have a visible interface Instead, code components are Classes, which must be accessed through a properly declared object variable.Another category of ActiveX components is the ActiveX document. ActiveX document~ are applications that can be hosted in containers such as Internet Explorer and the Office Binder. At this time, there aren’t many ActiveX documents on the Internet (personally, I haven’t.seen any), and it seems it will be a while before they catch up. The practicality of developing applications for Office Binder is even more questionable. This book doesn’t cover ActiveX documents, which are really simple compared to ActiveX code components and ActiveX controls.