- Creating Visual Basic Components for the Web
- Making a Web-Aware ActiveX Custom Control
- Understanding Custom Controls and Asynchronous Transfer
- Working with UserControl.AsyncRead
- Downloading a Graphic
- Understanding Properties in Terms of AsyncRead
- Working with the FileSystemObject
- Compiling the Custom Control
- Packing the Custom Control
- Deploying the Custom Control with a Sample Page
- Updating the Custom Control
Packing the Custom Control
The Package and Deployment Wizard that ships with Visual Basic allows you to deploy your custom control in a standard setup configuration so that other programmers may use it in their activities. Also, the Package and Deployment Wizard allows you to choose an Internet deployment option. This option compresses your custom control's file and all the files upon which the custom control is dependent into a CAB file. In addition, the Wizard creates a sample Web page into which the custom control is embedded. (See Figure 3.)
Figure 3: Internet Package can be selected if you want the Package and Deployment Wizard to create a CAB file that contains your custom control's files.
The Package and Deployment Wizard is smart enough to include and compress the Visual Basic run-time files and ActiveX components that the project requires. The Wizard adds a layer of ease to the download process by allowing you to delegate downloading of these files directly to the Microsoft site. Figure 4 shows the Wizard step in which you indicate that you want to have run-time files downloaded from the Microsoft Web site. Please notice that in this case, because we are using the FilesSystemObject in our code, which is in the Scripting RunTime Library, the Wizard has added the Scripting RunTime ActiveX Component to our list of needed files. In addition, it will configure the internals of the CAB file to download the Scripting RunTime from the Microsoft site.
Figure 4: You can configure the Package and Deployment Wizard to have your deployment download Microsoft files directly from the Microsoft site.