Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6!:Debugging And Distributing Your Applications
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
var end = document.cookie.indexOf (";", j);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(j, end));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
var m1='';
var gifstr=GetCookie("UsrType");
if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; }
document.write(m1+m2+m3);
Keyword
Title
Author
ISBN
Publisher
Imprint
Brief
Full
Advanced Search
Search Tips
Please Select
-----------
Components
Content Mgt
Certification
Databases
Enterprise Mgt
Fun/Games
Groupware
Hardware
IBM Redbooks
Intranet Dev
Middleware
Multimedia
Networks
OS
Prod Apps
Programming
Security
UI
Web Services
Webmaster
Y2K
-----------
New Titles
-----------
Free Archive
To access the contents, click the chapter and section titles.
Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6!
(Publisher: The Coriolis Group)
Author(s): Peter G. Aitken
ISBN: 1576102815
Publication Date: 08/01/98
function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}
function bookMarkit()
{
var url="http://www.itknowledge.com/PSUser/EWBookMarks.html?url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();
}
Search this book:
Previous
Table of Contents
Next
Preparing a Visual Basic program for distribution consists of two parts: You must create the setup program that the end user runs to install your program; you must package the program and its setup files so they can be placed on diskettes, a CD-ROM, or the Internet. The setup program is normally created automatically for you, but you have the option of customizing it. Packaging of the program files is accomplished by the Package and Deployment Wizard.
Table 26.2 Visual Basics Step commands.
Command
When Program HasNot Yet Started
When Program Is PausedAt A Breakpoint
Shortcut Key
Step Into
Executes the first statement. If the first statement is a procedure call, pauses at the first statement in the procedure.
Executes the next statement. If the next statement is a procedure call, pauses at the first statement in the procedure.
F8
Step Over
Executes the first statement. If the first statement is a procedure call, executes all statements in the procedure, and pauses at the first statement following the procedure.
Executes the next statement. If the next statement is a procedure call, executes all statements in the procedure and pauses at the first statement following the procedure.
Shift+F8
Step Out
Not available.
If execution is paused in a procedure, executes the remainder of the procedure and pauses at the first statement following the procedure.
Ctrl+Shift+F8
Creating The Setup Program
As with most Windows programs, a Visual Basic program is installed by running SETUP.EXE. When you create a distribution package for a Visual Basic program, SETUP.EXE is automatically included as part of the package. This program has basically only one function: to execute the program SETUP1.EXE. This may seem like a strange way to do things, but there is a reason behind it. While SETUP is fixed and cannot be changed, you can customize SETUP1 to meet the specific setup requirements of your program. In fact, SETUP1 is itself a Visual Basic program, located in the folder \VB98\WIZARDS\PDWIZARD\SETUP1.
Heres how it works: When you run the Package and Deployment Wizard (covered later in the chapter), it includes SETUP1.EXE, which will be included in your programs distribution package. If you have customized and compiled SETUP1, your changes will be included; otherwise, the default version is used.
When would you need to customize SETUP1? To be honest, almost never. I have written and distributed quite a few Visual Basic programs, and I have not needed to do so even once. The possibility does exist, however. For example, you might want to give your users the option of either installing a large Help file to their hard disk or running it from the distribution CD-ROM. The basic procedure for customizing SETUP1 is as follows:
1. Open the SETUP1 project.
2. Create one or more new forms to display information and collect user responses about the available installation options.
3. Select the form frmSetup1 and display the code in the Form_Load procedure.
4. Locate the call to the procedure ShowBeginForm. Immediately after this call, add code to display your option dialog boxes. For simple options, you may be able to use the MsgBox function to input Yes/No answers.
5. Add code to the Form_Load procedure as required by your installation options. You will find comments interspersed in the source code explaining what exactly needs to be added.
6. Compile the SETUP1 project to create SETUP1.EXE.
7. Run the Package and Deployment Wizard to create a distribution package for your program.
8. Locate the SETUP.LST file that was created by the wizard. This file contains information about the files and icons that are part of the program installation. Use any text editor, such as WordPad, to make necessary additions and changes to this file.
Youll find more detailed information on editing SETUP.LST and other aspects of customizing the setup program in the online Visual Basic Help system. It is not a difficult process, and as I have mentioned, it is something you will rarely need to do. Remember, whether or not you customize your setup, be sure to test it thoroughly before distributing it.
The Package And Deployment Wizard
The Package and Deployment Wizard (or PD Wizard) is on the same level as sliced bread and indoor plumbing in terms of being a great thing. Assembling all the files needed to distribute your Visual Basic application and packaging them for distribution would be a miserable task without this tool. You can run the PD Wizard either as an add-in in Visual Basic or as a standalone. To run it as an add-in, use the Add-In Manager (select Add-In Manager from the Add-Ins menu in Visual Basic) to load the PD Wizard. Load the project you want to package/distribute into Visual Basic, then run the PD Wizard from the Add-Ins menu. To run it as a standalone, execute the file PDCMDLN.EXE. In either case, when the program starts, youll see the opening screen shown in Figure 26.5.
Figure 26.5 The PD Wizards opening screen.
As the name suggests, the PD Wizard has two functions:
Packaging your programDetermining which files are needed and combining them and the setup program into a compressed form. Packaging can also include the process of copying distribution files to diskettes.
Deploying this packageMoving it to a network or Internet site where people can access it.
These two functions are accessed via the corresponding buttons on the PD Wizards opening screen. The third button, Manage Scripts, is used to work with scripts that let you automate some of the PD Wizards functions for repetitive tasks. I will not be dealing with script management in this book.
Packaging Your Application
You have several distribution options when packaging your application:
Distributing the program on multiple diskettes, splitting files that are too large to fit onto a single diskette.
Placing the distribution files in a hard-disk directory for distribution over a network or mastering onto CD-ROM.
Distributing your application across the Internet using the automatic code download capability of Microsoft Internet Explorer.
Previous
Table of Contents
Next
Products | Contact Us | About Us |
Wyszukiwarka
Podobne podstrony:
26 04 W Instalacje BudowlaneNowelizacja prawa OŚ 26 04 200726 04 2013 Anatomiaantropomotoryka 26 04STOMATOLOGIA DZIECIĘCA, ĆWICZENIE 8, 26 04 2013FIDE Trainers Surveys 2014 04 26, Vereslav Eingorn The positional piece sacrifice as a technical r2011 04 04 WIL Wyklad 2604 Tryb i zakres … Dz U 2000 26pdms 2016 04 26dp2014 04 26 WHO Astma powysilkowawięcej podobnych podstron