共用方式為


Run Event

Occurs when an Active Document is ready to run user code.

PROCEDURE ActiveDoc.Run
LPARAMETERS cHyperlinkTarget

Parameters

  • cHyperlinkTarget
    cHyperlinkTarget is a parameter that is passed to the Run event from a URL (Universal Resource Locator) when HTTP (Hypertext Transfer Protocol) is used to run an Active Document. The parameter is passed as character data, and is appended in the URL to the name of the Active Document with a pound sign (#). For example, the following URL passes the character string "TargetString" to the Run event in an Active Document named MyActiveDoc:

    Http://MyServer/MyActiveDoc.APP#TargetString
    

    Note that the pound sign (#) is passed as the first character to cHyperlinkTarget. You can use SUBSTR( ) to remove the leading pound sign, as in the following Run event code:

    LPARAMETERS cHyperLinkTarget
    cNewTarget = SUBSTR(cHyperLinkTarget, 2, LEN(cHyperLinkTarget))
    

Remarks

The Run event should be the starting point for your Active Document application. Typically, the Run event contains code that executes your menu code, executes the main form in the application, and contains READ EVENTS to start event processing.

You can put setup code in your Active Document's Init event, but if the code takes too long to execute, the Active Document container may generate a time out error. If you do put setup code in the Init event, it should not require user interaction or create a user interface.

See Also

Init Event | SUBSTR( )

Applies To: ActiveDoc Object