BorderColor

GetHost(), IsHosted()

Use these functions to manipulate the browser supporting your Active Document.

Usage

lIsOrIsnt = IsHosted() oBrowser = GetHost()

Parameter

Value

Meaning

lIsOrIsnt

.T.

Current form is hosted within a browser.

.F.

Form is not hosted in a browser.

oBrowser

Null

No browser object is available.

Object

An object reference to the browser is acting as host.


Use the IsHosted() function to separate the logic that should run when your forms are running as ActiveDocuments from the logic that they should use as stand-alone forms. If running as ActiveDocuments, a call to GetHost returns an object reference to the hosting browser. Using this reference, you can determine the identity of the host, and then manipulate the object model of the host (such as turning off features or changing the navigation model) to properly host your application.

Example

IF IsHosted()   loBrowser = GetHost()   WAIT WINDOW "Hosted by " + loBrowser.Name ELSE   WAIT WINDOW "Not browsing"   loBrowser = .NULL. ENDIF

See Also

ActiveDoc


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net