DeleteMark

StartMode

This property of the Application object lets you determine how the application was started, so you can decide on the right course of action depending on the facilities available.

Usage

nRetVal = Application.StartMode

Parameter

Value

Meaning

nRetVal

0

Normal VFP interactive session.

1

Out-of-process (EXE) OLE Server.

2

Runtime out-of-process OLE Server.

3

Runtime in-process OLE Server.


Use the StartMode property to determine what capabilities are available to you. For example, you don't want to raise an error on your big, fancy error-handling form if the application is running as an out-of-process server where you don't have access to the user interface.

Example

? _VFP.StartMode  && 0, from the Command Window * FoxMind.Remind is a simple test server, created as an EXE oDear = CreateObject("FoxMind.Remind") ? oDear.Application.StartMode  && returns 2 * Rebuild the server as a DLL ? oDear.Application.StartMode  && returns 3

See Also

Application, _VFP


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