CREATE LABEL

Run

Some keywords just plain have too many meanings in FoxPro. Run is definitely in this category. This version is a method of the File object. Not surprisingly, it executes the file.

Usage

filFile.Run
Calling this method is just like clicking the Run button in the Project Manager. Programs, queries, forms, menus and applications run. For reports and labels, the Run method is like clicking the Preview button. Bizarre, but it makes sense since in the Project Manager, the Run button turns into a Preview button when a report has focus. In the same vein, tables get browsed. Other kinds of files do nothing. Regardless of what actually happens, the method returns .T.

Just like when you run things from the PM, there's no way to pass parameters to the called file. This could be a problem if what you're trying to do programmatically with your project is test it.

If the project has an associated project hook, the QueryRunFile event fires before the file runs. That gives you a chance to react to the call.

Example

_VFP.ActiveProject.Files[3].Run

See Also

File, Project, QueryRunFile


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