[ Pobierz całość w formacie PDF ]
.Your control should also be tested in all target applications that will use the control.To debug the ActiveX control, select Run|Parameters and type the client name in theHost Application edit box.The parameters then apply to the host application.Selecting Run|Run will run thehost or client application and allow you to set breakpoints in the control.Deploying an ActiveX control on the WebBefore the ActiveX controls that you create can be used by Web clients, they must bedeployed on your Web server.Every time you make a change to the ActiveX control,you must recompile and redeploy it so that client applications can see the changes.Before you can deploy your ActiveX control, you must have a Web Server that willrespond to client messages.To deploy your ActiveX control, use the following steps:1 Select Project|Web Deployment Options.2 On the Project page, set the Target Dir to the location of the ActiveX control DLLas a path on the Web server.This can be a local path name or a UNC path, forexample, C:\INETPUB\wwwroot.3 Set the Target URL to the location as a Uniform Resource Locators (URL) of theActiveX control DLL (without the file name) on your Web Server, for example,http://mymachine.borland.com/.See the documentation for your Web Server formore information on how to do this.Cr eat i ng an Ac t i v eX c ont r ol 45-15De p l o y i n g a n Ac t i v e X c o n t r o l o n t h e We b4 Set the HTML Dir to the location (as a path) where the HTML file that contains areference to the ActiveX control should be placed, for example, C:\INETPUB\wwwroot.This path can be a standard path name or a UNC path.5 Set desired Web deployment options as described in Setting options onpage 45-16.6 Choose OK.7 Choose Project|Web Deploy.This creates a deployment code base that contains the ActiveX control in anActiveX library (with the OCX extension).Depending on the options you specify,this deployment code base can also contain a cabinet (with the CAB extension) orinformation (with the INF extension).The ActiveX library is placed in the Target Directory you specified in step 2.TheHTML file has the same name as the project file but with the HTM extension.It iscreated in the HTML Directory specified in step 4.The HTML file contains a URLreference to the ActiveX library at the location specified in step 3.Note If you want to put these files on your Web server, use an external utility suchas ftp.8 Invoke your ActiveX-enabled Web browser and view the created HTML page.When this HTML page is viewed in the Web browser, your form or control isdisplayed and runs as an embedded application within the browser.That is, thelibrary runs in the same process as the browser application.Setting optionsBefore deploying an ActiveX control, specify the Web deployment options thatshould be followed when creating the ActiveX library.Web deployment options include settings to allow you to set the following:" Including additional files: If your ActiveX control depends on any packages orother additional files, you can indicate that these should be deployed with theproject.By default, these files use the same options that you specify for the entireproject, but you can override these settings using the Packages or Additional filestab.When you include packages or additional files, Delphi creates a file with the.INF extension (for INFormation).This file specifies the various files that need tobe downloaded and set up for the ActiveX library to run.The syntax of the INF fileallows URLs pointing to packages or additional files to download.45-16 Dev el oper s Gui deDe p l o y i n g a n Ac t i v e X c o n t r o l o n t h e We b" CAB file compression: A cabinet is a single file, usually with a CAB file extension,that stores compressed files in a file library.Cabinet compression can dramaticallydecrease download time (up to 70%) of a file.During installation, the browserdecompresses the files stored in a cabinet and copies them to the user s system.Each file that you deploy can be CAB file compressed.You can specify that theActiveX library use CAB file compression on the Project tab of the WebDeployment options dialog." Version information: You can specify that you want version information includedwith your ActiveX control
[ Pobierz całość w formacie PDF ]