Internet
Explorer Plug-In and
ActiveX Companion

Written by Krishna Sankar with
Geoffrey Baird, Don Doherty, Ph.D., Rob Falla, Brian Farrar, Jerry Honeycutt, Jr., Jim O'Donnell


CONTENTS

Introduction

Chapter 1   Introducing ActiveX Controls

Chapter 2   Inserting ActiveX Controls on the Web Page

Chapter 3   Creating Web Pages with the ActiveX Control Pad

Chapter 4   Understanding ActiveX: The Technology

Chapter 5   Understanding Authentication and Security

Chapter 6   Using Netscape Plug-Ins in Internet Explorer 3.0

Chapter 7   ActiveX and Visual Basic

Chapter 8   Server-Side ActiveX

Chapter 9   Java & ActiveX

Chapter 10   ActiveX and Microsoft Office

Chapter 11   Publishing Your Database on the Web

Chapter 12   Form Element Controls

Chapter 13   Web Navigation Controls

Chapter 14   Database Controls

Chapter 15   Imaging and Portable Document Controls

Chapter 16   Animation Controls

Chapter 17   VRML Controls

Chapter 18   Conferencing Controls

Chapter 19   Audio Plug-Ins

Chapter 20   Video Controls

Chapter 21   Other Controls

Chapter 22   The Future of ActiveX

Appendix A   ActiveX Controls Index

Appendix B   What's on the CD?

Credits


Internet Explorer Plug-In and ActiveX Companion

Copyright© 1997 by Que ® Corporation.

All rights reserved. Printed in the United States of America. No part of this book may be used or reproduced in any form or by any means, or stored in a database or retrieval system, without prior written permission of the publisher except in the case of brief quotations embodied in critical articles and reviews. Making copies of any part of this book for any purpose other than your own personal use is a violation of United States copyright laws. For information, address Que Corporation, 201 W. 103rd Street, Indianapolis, IN 46290. You may reach Que's direct sales line by calling 1-800-428-5331.

ISBN: 0-7897-1062-5

HTML conversion by :
    M/s. LeafWriters (India) Pvt. Ltd.
    Website : http://leaf.stpn.soft.net
    e-mail : leafwriters@leaf.stpn.soft.net


PresidentRoland Elgey PublisherStacy Hiquet
Publishing ManagerJim Minatel Title ManagerSteven M. Schafer
Editorial Services DirectorElizabeth Keaffaber Managing EditorSandy Doell
Director of MarketingLynn E. Zingraf Acquisitions ManagerCheryl D. Willoughby
Acquisitions EditorStephanie Gould Senior EditorsPatrick Kanouse, Caroline D. Roop
Product DirectorSteven M. Schafer Production EditorsJade Leah Williams, Susan Ross Moore
EditorsJim Bowie, Sean Dixon, Patricia R. Kinyon, Tonya Maddox, Bill McManus Product Marketing ManagerKristine Ankney
Assistant Product Marketing Managers Karen Hagen, Christy M. Miller Strategic Marketing ManagerBarry Pruett
Technical Editor(s)Russ Jacobs, Jim O'Donnell Technical Support SpecialistsNadeem Muhammed
Acquisitions CoordinatorJane K. Brownlow Software Relations Coordinator Susan D. Gallagher
Book DesignerRuth Harvey Cover DesignerBarbara Kordesh
Production TeamMichael Beaty , Jason Carr, Erin M. Danielson, Anjy Perry
IndexerCraig Small

About the Authors

Krishna Sankar is the cofounder of U.S. Systems & Services, a Silicon Valley intranet systems and Java technology company. He has worked on strategic business systems, ranging from real-time process control applications to client/server and groupware systems, for companies such as HP, GM, AT&T, U.S. Air Force and Navy, Pratt & Whitney, Testek, Ford, TRW, Caterpillar, Quantas Airlines, and Air Canada. He still believes in information reengineering and development of competitive business systems and is excited about the possibilities of intranet applets and servlets in those areas. He is a Microsoft Product Specialist as well as a Lotus Notes Certified Professional. Occasionally, you can find him at the corridors of venture capitalists and banks promoting products "for whose lives are not Internet but want to leverage the Net to enjoy it."

"Jerry" Honeycutt, Jr. provides business-oriented technical leadership to the Internet community and software development industry. He has served companies such as The Travelers, IBM, Nielsen North America, IRM, Howard Systems International, and NCR. Jerry has participated in the industry since before the days of Microsoft Windows 1.0 and is completely hooked on Windows 95 and the Internet.

Jerry graduated from the University of Texas at Dallas in 1992 with a B.S. degree in computer science. He currently lives in the Dallas suburb of Frisco, Texas with Becky, two Westies, Corky and Turbo, and a cat called Scratches. Jerry is an avid golfer with a passion for fine photography. Feel free to contact Jerry on the Internet at jerry@honeycutt.com or visit his Web site at http://rampages.onramp.net/~jerry.

Geoffrey Baird graduated from the University of Michigan in 1991. Joining Metamor Technologies in 1992, he worked in application development and systems support before leaving to head up marketing operations. In 1994, he helped form the Internet and intranet practice at Metamor, and has consulted for, trained, and developed Internet applications for some of the world's largest companies.

Dr. Donald Doherty is a brain scientist and a computer expert. His research into signal processing in both brains and computers keeps him pushing technology to its fullest capacity. Don enjoys sharing some of his adventures through writing about computers and the Internet.

Rob Falla is a computer author, professional Web developer, freelance writer, and speculative fiction writer. He is the author of the book HTML Style Sheets Quick Reference (published by QUE) and recently won first place for a speculative fiction short story titled "The October Comet." Rob is currently living in Nanticoke, Ontario with his wife Kathy and their two daughters. Rob is available for any questions or comments through e-mail at rfalla@netroute.net.

Brian Farrar received his B.A. in English and economics from Wabash College in 1985, and his M.B.A. from Indiana University in 1987. He began his career at GTE and progressed through a series of positions until 1994, when he left to start an Internet and intranet consulting practice for Metamor Technologies. Through this consulting practice, Brian has helped some of the largest companies in the world decide on and deploy Internet technologies to solve business problems.

Jim O'Donnell, was born on October 17, 1963, (you may forward greetings to odonnj@rpi.edu) in Pittsburgh, Pennsylvania. After a number of unproductive years, he began his studies in electrical engineering at Rensselaer Polytechnic Institute. He liked that so much that he spent 11 years there getting three degrees, graduating for the third (and final) time in the summer of 1992. He can now be found plying his trade at the NASA Goddard Space Flight Center. He's not a rocket scientist, but he's close.

Acknowledgments

My first thanks go to you, the reader. You gave me the motivation and the guidance to write this book. I always had you and your best interests in mind when I was contemplating the topics to be covered. Now that you are looking at this book, please do let me know how I did-what went right and what went wrong. If I was able to assist you in developing business logic and true n-tier Weblications across your intranet or if I motivated you to developed a date entry with drop-in calendar and users love you for it, then I have succeeded in my task.

Next, I wish to thank all the people at Que for their excellent work. Most of them I do not know, but they played an important role in getting this book into your hands. Of the people I dealt with directly at Que, Stephanie Gould was, is, and will be a motivating force for me. I thank Steve Schafer for his vision and ideas in shaping this book. Jade Williams literally ignored a harsh winter with temperatures approaching Ð40¡ F, to spend time editing this book, and of course, did an excellent job. To the coauthors of this book, I wish to record my thanks for their contributions and want to proudly share with them the credit for a book well done.

On the home front, my eternal gratitude goes to my wife, Subbalakshmi, "Usha," who is also my friend, philosopher, guide, and debate partner. She suffered through many hours of loneliness and my near-maniacal discussions about ActiveX. The encouragement given by my mother and Usha's parents was very valuable, not only in writing this book but also in keeping my sanity (which is still a question mark in the minds of many). My younger siblings, Jyothi and Prakash, and Usha's siblings, Suresh and Vaishali, always asked me how the chapters were going and I would mumble something about not getting time and inspiration. Now I can tell them truthfully that the book is finished! And lastly, I wish my late father was with us to see my book in print.

We'd Like to Hear from You!

As part of our continuing effort to produce books of the highest possible quality, Que would like to hear your comments. To stay competitive, we really want you, as a computer book reader and user, to let us know what you like or dislike most about this book or other Que products.

You can mail comments, ideas, or suggestions for improving future editions to the address below or send us a fax at (317) 581-4663. For the online inclined, Macmillan Computer Publishing has a forum on CompuServe (type GO QUEBOOKS at any prompt) through which our staff and authors are available for questions and comments. The address of our Internet site is http://www.quecorp.com (World Wide Web).

In addition to exploring our forum, please feel free to contact me personally to discuss your opinions of this book at sschafer@que.mcp.com on the Internet.

Thanks in advance-your comments will help us to continue publishing the best books available on computer topics in today's market.

Steven M. Schafer
Product Development Specialist
Que Corporation
201 W. 103rd Street
Indianapolis, Indiana 46290
USA

NOTE
Although we cannot provide general technical support, we're happy to help you resolve problems you encounter related to our books, disks, or other products. If you need such assistance, please contact our Tech Support department at 800-545-5914, ext. 3833.
To order other Que or Macmillan Computer Publishing books or products, please call our Customer Service department at 800-835-3202, ext. 666.

Introduction

What is ActiveX? Quoting Microsoft from its Web page, "ActiveX is a set of technologies that integrate software components in a networked environment, regardless of the language in which they were created. This integration of components enables content and software developers to easily create interactive applications and Web sites. As a leading commercial object model, ActiveX has been widely adopted by corporate MIS and ISV communities and is used by millions of application and content developers today."

This book is a reference for the ActiveX technology with emphasis on the actual controls-the thrills and chills of corporate systems development. You should keep this book near your computer and refer to it when developing controls and Web pages.

ActiveX and This Book

The ActiveX technology does not lack information; instead, it lacks structured information that can be accessed readily when required by a developer. Although there are many controls available, it takes time to download, install, try out, and categorize each available control before you can use it. That is where this book comes in by providing structured information on the properties, methods, and events of a set of ActiveX controls to help you create interactive, useful Web pages for your Internet or intranet Web applications.

The ActiveX controls do not stand in a vacuum. They are best understood in COM, OLE, and other contexts. Hence there are chapters on related technologies that will put the ActiveX controls in perspective.

Even though not directly, this book targets Web developers of three-tier to n-tier business processes across corporate intranets. Static Web pages are almost a relic. Dynamic Web pages, which perform some kind of business function over and beyond corporate information publishing, are becoming a norm. You should be developing Weblications-client/server applications over the intranet.

What Is This Weblication Anyway?
Weblication is the short form for a Web-based application-a new systems development paradigm or approach. Weblications consist of HTML pages, probably generated dynamically as the client requests them, as opposed to the current client/server forms-based applications. In essence, they are HTML-based, TCP/IP protocol-backboned client/server applications with the Web browser as the client presentation layer. The logic and objects in a Weblication span operating systems and interfaces across many systems geographically separated in many time zones and countries. Weblications are more dynamic in nature and can have richer multimedia content, and they are more widely distributed and follow mostly the fat server/thin client architecture.

You should be able to prototype strategic business applications (Weblications) across the Web to show effective systems. Once approved, you can turn them into solid industrial- strength Weblications using rapid application development (RAD) techniques and tools. This strategy calls for components and component-based development, and this is where you can begin to use ActiveX controls and the Visual Basic Control Creation Edition.

History of ActiveX

After Windows 3.1 became popular as a desktop environment, developers were scrambling to develop products with the graphical user interface (GUI). The products that embraced the GUI paradigm survived, while those late-to-market were almost left behind.

The first development tools were using mostly assembly languages, such as C, with the Windows API. You needed to be an expert in handles as hWND and message loops-and then came Visual Basic. The arrival of Visual Basic was the beginning of true RAD environments.

Visual Basic pioneered (popularized might be a more accurate choice, but for many, pioneered is accurate) not only the visual development of Windows applications, but also the component development. The component development was done by Visual Basic (VBX) controls. A cottage industry sprang up developing and supporting VBX. Even Borland's Delphi and Powersoft's PowerBuilder development products began supporting the VBX components. The architecture for buying components, including them into your GUI, and controlling them from your code was a dream come true for the RAD practitioners.

For all their glory, VBX controls were not perfect. They had many limitations, the foremost of which was their 16-bit nature. They were also closed-aligned with the architecture of the BASIC language.

At this time, Microsoft started introducing the new technology called OLE. In 1991, OLE succeeded DDE (dynamic data exchange) as a technique by which different applications communicate with each other on the desktop system. OLE 1.0 had its humble origin from inserting objects usable by one program into another program. The original expansion of the OLE acronym was object linking and embedding. By 1993, OLE 2.0 metamorphosed from an acronym to just OLE-a name for the COM implementation (COM is a binary specification for interoperable objects). The component-based systems architecture began to take shape.

A Note from the Author
This is not a complete explanation of OLE and COM. This is to give you a perspective on the technologies. If you plan to embrace the ActiveX technology, you should at some point read through some material on OLE and COM.
Also, there are other competing and equally capable technologies like CORBA, IIOP, and so on, from OMG and other groups.

Microsoft started supporting the COM and OLE vigorously after the VBX industry turned its VBX controls into 32-bit OLE controls and then came the Internet. The rest, as they say, is history.

One outcome of the Internet revolution is that the pre-Internet OLE controls became ActiveX controls in the post-Internet era. these controls gained on-demand automatic downloading capability (through the Web browser) with authenticode verification and scripting programmability from the Web pages. The controls are easy to use and are true drop-in components. The dropped-in components can be connected using straightforward scripts to develop dynamic Web pages resulting in reduced development and deployment times. That is where the ActiveX controls are useful to Webmasters and developers like yourself. Your motto should be, "Buy, not build, and when you build, reuse."

What's in This Book

This book consists of four parts.

Part I, "Understanding ActiveX," introduces you to the world of ActiveX.

Part II, "ActiveX Technology," gives you a perspective of the use of ActiveX components. Here you will find information on security, using ActiveX with the Netscape Web browser, Microsoft Office, databases, and more. You will also find chapters on Visual Basic, Java, and server-side ActiveX.

Part III, "ActiveX Control and Plug-In Reference," constitutes the bulk of the content, categorizing controls and plug-ins with descriptions of each property, method, and event. The controls range from GUI-related form element controls (Chapter 12) to Web navigation (Chapter 13) and database controls (Chapter 14). On the multimedia side, there are controls dealing with images and animation (Chapters 15 and 16), VRML controls (Chapter 17), conferencing controls (Chapter 18) and finally, audio and video controls (Chapters 19 and 20). In Chapter 21, you will come across a bunch of controls like the FTP, MIME, NNTP, and the UUEncode/Decode that cannot be categorized in any other chapters. And finally, we end this book with Chapter 22, "The Future of ActiveX."

Part IV, "Appendixes," contains the index of ActiveX controls found in this book and the contents of the companion CD-ROM.

When I was approached by Stephanie Gould of Que to write this book, I grabbed the idea with reckless abandon. I knew I would learn more about this exciting technology and that, itself, was reason enough to write this book. Now that I am done with the book, I can surely say that the journey was worthwhile. That big software giant in Seattle is capable of developing nifty technology when awakened, as it did with the Internet.