Copy PRG contents to Clipboard
By Sergey - Posted on February 11th, 2008
In VFP 9.0 PRG contents will be copied to clipboard in RTF format as well, if there's no 'X' in the _Vfp.EditorOptions.
The code uses Editor functions from Foxtools.fll. See George Tasker's Extended Foxtools Help Download #9333 on UT for more info.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
#DEFINE FO_READONLY 0 LOCAL ARRAY laEnv [25] LOCAL lnHandle, lnResult SET LIBRARY TO FoxTools ADDITIVE && Open the VFP Editor lnHandle = _EdOpenFil(lcFile, FO_READONLY) lnResult = _EdGetEnv( lnHandle, @laEnv ) && [ 2 ] File Size && Select ALL _EdSelect(lnHandle, 0, laEnv[2]) llOK = .T. && Copy to clipboard IF NOT _EdCopy(lnHandle) MESSAGEBOX("Couldn't Copy ") llOK = .F. ENDIF && Close Editor window = _Wclose(lnHandle)
Recent comments
7 hours 22 min ago
4 days 15 hours ago
4 days 16 hours ago
1 week 15 hours ago
1 week 16 hours ago
2 weeks 1 day ago
2 weeks 1 day ago
2 weeks 4 days ago
2 weeks 4 days ago
2 weeks 6 days ago