Dan Appleman's Developing ActiveX Components With Visual Basic 5.0
Dan Appleman's Developing ActiveX Components With Visual Basic 5.0
Dan Appleman
CONTENTS
Introduction
❍ On My Target Audience
❍ On Approach
● On Style
● On Scope
● Final Comments
❍ On Microsoft
❍ On Free Software
❍ On Desaware
❍ On E-mail
● ActiveX Myths
● ActiveX: A Historical (but Technical) Perspective
● Objects and Visual Basic
● The Component Object Model: Interfaces, Automation, and
Binding
● Aggretion and Polymorphism
● The Life and Times of an ActiveX Component
● ActiveX Components: What's in a Name?
● Back to Binding
● An Object as Object
● Aggregation
● An Object Implements
❍ Trade-offs
❍ ActiveX Documents
● ActiveX Trade-offs
❍ Classes
❍ ActiveX DLLs (Code Components) (In Process)
❍ ActiveX EXE Servers (Out of Process)
❍ ActiveX Controls
❍ ActiveX Documents (Doc Objects)
● The Project
● Creating and Testing Components
● Code and Classes-Beyond the Manuals
● Events
● Collecting Objects
● Object Lifetime
● Multithreading
● Bringing It All Together: The StockQuote Server
● Project Overview
❍ Designing the Object Model
● Instancing
❍ Private
❍ PublicNotCreatable
❍ SingleUse
❍ MultiUse
❍ GlobalMultiUse
❍ GlobalSingleUse
❍ Variations on Instancing
● Project Properties
❍ General Property Settings
❍ Application Title
❍ Application Icon
● Moving On
❍ A Component is Born
❍ More on Properties
❍ Is It a Property or Is It a Method?
❍ Parameterized Properties
❍ Option Explicit
❍ Parameters That Handle Large Blocks of Data: Arrays and User-Defined Types
● Procedure Attributes
❍ Description
❍ Help Context ID
❍ Procedure ID
❍ Scoping Rules
● Selected Topics
❍ Enums
Chapter 11 Events
● Back to COM
❍ Creating Separate Events with OLE Callbacks
● Referencing
❍ What Happens When…?
● Circular References
❍ Object Model Dilemmas
❍ Initialization Events
❍ Termination Events
❍ Unkillable Applications
❍ Private Objects
Chapter 14 Multithreading
❍ Multithreading Pitfalls
● Multithreaded Components
❍ On Threads and Objects
❍ Scoping Revisited
❍ Debug Monitor
● Multithreading Examples
❍ The Proof Is in the Timing
● Top-Down Design
❍ High-Level Design Review
● Implementation
❍ Everything You Need to Know about HTML
❍ Parsing HTML
❍ On Referencing
● Things Every Programmer Should Know about ActiveX Controls before He or She Writes a Single Line of Code
❍ ActiveX Controls Are Platform-Limited
❍ A Cacophony of Objects
❍ User-Drawn Controls
● Lifetime-Related Events
❍ The Initialize Event
❍ Bitmap-Based Controls
❍ Control Dependencies
❍ Container Dependencies
● Ambient Properties
❍ Specific Properties
❍ OLE_COLOR
❍ OLE_TRISTATE
❍ OLE_OPTEXCLUSIVE
❍ Enumerated Types
● Property Procedures
❍ Using ByVal with Property Let Functions
❍ Raising Errors
❍ Property Category
● Custom Objects
❍ The clsMyObject Fraction Object
● Persistence
❍ Mapping Properties
❍ Self-Persisting Objects
❍ Asynchronous Persistence
❍ Updating Controls
● DataBinding
❍ The Easy Way
❍Safety ≠ Signing
❍ Distributing and Downloading ActiveX Controls
❍ Signing Controls
❍ What is Subclassing?
● Messaging Examples
❍ Advanced Keystroke Handling
❍ A User-Drawn Control
❍ Versioning
❍ Containers
❍ Menus
❍ Error Checking
❍ Property Persistence
● Versioning
● Licensing and Distribution
Chapter 25 Versioning
● Version Resources
● Version Compatibility
❍ Inside Binary Compatibility
❍ Conclusion
Chapter 26 Licensing and Distribution
Credits
HTML conversion by :
M/s. LeafWriters (India) Pvt. Ltd.
Website : http://leaf.stpn.soft.net
e-mail : [email protected]
All other product names and services identified throughout this book are trademarks or registered trademarks of their respective
companies. They are used throughout this book in editorial fashion only and for the benefit of such companies. No such uses, or the
use of any trade name, is intended to convey endorsement or other affiliation with the book.
No part of this publication may be reproduced in any form, or stored in a database or retrieval system, or transmitted or distributed in
any form by any means, electronic, mechanical photocopying, recording, or otherwise, without the prior written permission of
Macmillan Computer Publishing USA, except as permitted by the Copyright Act of 1976, and the End-User License Agreement at
the back of this book, and except that program listings may be entered, stored, and executed in a computer system.
EXCEPT FOR THE LIMITED WARRANTY COVERING THE PHYSICAL DISC PACKAGED WITH THIS BOOK AS PROVIDED IN
THE END-USER LICENSE AGREEMENT AT THE BACK OF THIS BOOK, THE INFORMATION AND MATERIAL CONTAINED IN
THIS BOOK ARE PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION ANY WARRANTY CONCERNING THE ACCURACY, ADEQUACY, OR COMPLETENESS OF SUCH INFORMATION
OR MATERIAL OR THE RESULTS TO BE OBTAINED FROM USING SUCH INFORMATION OR MATERIAL. NEITHER
MACMILLAN COMPUTER PUBLISHING USA NOR THE AUTHOR SHALL BE RESPONSIBLE FOR ANY CLAIMS ATTRIBUTABLE
TO ERRORS, OMISSIONS, OR OTHER INACCURACIES IN THE INFORMATION OR MATERIAL CONTAINED IN THIS BOOK, AND
IN NO EVENT SHALL MACMILLAN COMPUTER PUBLISHING USA OR THE AUTHOR BE LIABLE FOR DIRECT, INDIRECT,
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF SUCH INFORMATION OR MATERIAL.