The information in this article applies to:
SUMMARY
You can pass an argument to an Active Document application in one of two
ways, depending on how the application runs:
MORE INFORMATIONHosted By Internet ExplorerWhen the Active Document application is hosted in an Internet browser, any arguments specified are sent directly to the Run event of the ActiveDoc class. The following line of code is included as the first line in the Run event by default:
The Run event can only receive one parameter. However, you may parse this
one parameter into multiple parameters once received by the Run event.
Multiple parameters may be strung together with a delimiter such as a plus
sign. The developer needs to code the application to look for the delimiter
character when parsing out multiple parameters.
Passing an argument to an Active Document application uses the following syntax:
Everything, starting with and including the pound sign passes into the Run
event as a parameter. Therefore, you need to remove the pound sign from the
parameter.
Parameters can only pass to an Active Document application that is hosted in a Web browser if the Active Document application is being served by a Web server such as Microsoft Internet Information Server. A parameter cannot pass to an Active Document application that runs in the browser with the Run Active Document command from Visual FoxPro's Tools menu. Nor can a parameter pass to an Active Document application if you type the location directly into the Web browser's address bar. For instance, you can run an Active Document application by typing the following into Microsoft Internet Explorer's address bar, but you cannot pass any parameters:
In Visual FoxProWhen the Active Document is hosted in Visual FoxPro or the Visual FoxPro run-time, the arguments pass to the Init event of the ActiveDoc class. The syntax to run an Active Document application in the Visual FoxPro development environment is as follows:
MyADoc.app is the name of the Active Document application, and cMyParamVal
is the value of the parameter.
Parameters cannot pass to the Active Document application if you run the application from the Run Active Document command on the Tools menu, whether it is hosted in Visual FoxPro or not. Tips For Coding The ActiveDoc ClassSince there is a difference in where these parameters are being received, some tips to help avoid problems when creating an Active Document application that utilizes parameters are described below:
REFERENCESVisual FoxPro "Programmer's Guide," 6.0, Chapter 31 - Interoperability and the Internet Visual FoxPro Help, version 6.0, search on: "ISHOSTED()"; "GETHOST()" Additional query words: kbvfp600
Keywords : |
Last Reviewed: July 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |