Copy PRG contents to Clipboard
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
1 week 4 days ago
4 weeks 20 hours ago
4 weeks 23 hours ago
4 weeks 1 day ago
4 weeks 1 day ago
5 weeks 2 days ago
8 weeks 2 days ago
10 weeks 4 days ago
12 weeks 2 days ago
12 weeks 3 days ago