38
Visual Basic 6 Black Book:Deploying Your Program: Creating Setup Programs, Help Files, And Online Registration
In this chapter, we’ll see how easy it is to create setup programs with the Package And
Deployment Wizard. Once you’ve created your application’s EXE file, you’re all
set—the Package And Deployment Wizard will analyze what files your application
needs and include them in the data file for your setup program. The data itself is stored
in a cabinet file, with the extension .cab, and the setup.exe program will unpack and
deploy the contents of that file as needed.
Help Files
Help files are an asset to any application, and just about all serious applications come
with a Help system of some sort. In this chapter, we’ll see how to create Windows Help
files of the kind you can display on the user’s computer with standard Windows calls.
To create a Windows Help file, you use the Windows Help Workshop, which creates a
Help project. You place the actual Help text in a rich text (RTF) file, and add that file
to the Help project. Why rich text? The Help Workshop uses RTF files so that you can
embed jumps, called hotspots, that work like hyperlinks, and commands directly into
your Help file, encoding those items with rich text footnotes, hidden text, and so forth.
We’ll see how this works in this chapter. When you’re done with your RTF file, you
use the Help Workshop to compile it into an HLP file.
Now that you have an HLP file, how do you open it from Visual Basic? Here, we’ll use
the Windows API WinHelp function, which allows you a great deal of flexibility when
opening Help files. You can even make the Package And Deployment Wizard include
your Help files and data files in the setup program, as we’ll see in this chapter.
Online Registration
Keeping in touch with an application’s users is important for many programmers,
which is why online registration has become so popular. Using online registration, the
user has only to select a menu item to register the application with you.
In this chapter, we’ll use the FTP protocol to let users connect and register their
applications in a few easy steps. Using FTP is probably the most common method for
handling online registration and provides us with a better and more robust alternative to
using another alternative, email, because the Visual Basic email support relies on the
Microsoft MAPI system, which the user may not have enabled.
When users decide to register online, the program will display an information dialog
box, asking them to enter their name and email address. When they click a button
labeled Register, the program will establish an FTP connection to your server
(connecting to the Internet, if necessary, first) and upload the information the users
provided, along with the date and time. In this way, you can keep track of your
application’s users.
file:///E|/Program%20Files/KaZaA/My%20Shared%...sic%20-%20%20Black%20Book/ch30/1037-1040.html (3 of 4) [7/31/2001 9:06:31 AM]