AfterAppendProc

_ClipText

This is a very cool system variable. It contains the contents of the clipboard. What makes it cool is that you can give it a new value, and doing so puts that value on the clipboard.

Usage

_CLIPTEXT = cExpr cExpr = _CLIPTEXT
In Visual FoxPro for Windows (and FoxPro 2.x for Windows), FoxPro shares the Windows text clipboard. So, not only can you stuff strings into the clipboard to paste into your FoxPro app, you can stuff the clipboard in FoxPro and access that information in other Windows apps. You can also put information in the clipboard in other applications (like CharMap, to get those weird symbol characters) and access it through _CLIPTEXT in FoxPro applications.

Far more sophisticated use of the clipboard to pass data and more complex structures can be accomplished using the functions exposed in FoxTools or by using an Automation server's DataToClip() method. See those sections for details.

In versions prior to VFP 7, you can't put memo data directly into _CLIPTEXT, but apply any character function to it and you're in business. TRIM() usually does the trick.


Example

* Stuff the clipboard with the date. _CLIPTEXT = DTOC(DATE()) * Now you can insert the date by pressing CTRL+V.

See Also

DataToClip, FoxTools


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