Downloading Custom ActiveX Controls VB Help

testing custom ActiveX controls on your own computer is simple and the test pages will always work. If you post the page on a Web server and someone else attempts to open it remotely, they are not going to see the ActiveX control on the page because the control isn’t registered on the host system.

If you want to use a custom control on your Web site, you must create a CAB file with the control’s OCX file (and any other support files) and post it as well. When Internet Explorer runs into a Web page with a custom control, it looks up for the control’s CLASSID in the Registry. If it’s found there, Internet Explorer displays the control on the page. If not, it attempts to download the control from the server and install it on the host computer in order to use it. Of course, it will first notify the user that the page contains a control that may not be safe.

Over the Internet few people will agree to download a control from just any site. Web pages with custom ActiveX controls can be easily used on intranets (after the controls have been installed on the network’s computers they need not be downloaded again) but you should avoid them on the Web. You can use authentication certificates to convince viewers that your control is safe to download and use. The process is complicated and expensive, and I won’t discuss it here.

To download the CAB file fOJ a custom control, Internet Explorer expects to find the CODEBASE attribute in the <OBJECT> tag. The CODEBASE attribute is the URL of the CAB file on the Web server. And how about the CAB file? Visual Basic will create it for you with the Package and Deployment Wizard. This is a separate application that is installed along with Visual Basic and its purpose is to create
distribution files for your applications


I don’t discuss the Package and Deployment Wizard in this book. It’s a  sight forward utility that collects all the information it needs from you and creates an EXE file you can distribute to your clients or a CAB file you can post on a Web site Users download this file to their computers and it is installed there automatically by Internet Explorer.

Posted on November 7, 2015 in Introduction to the Web

Share the Story

Back to Top
Share This