sergey
Retrieving VFP runtime DLL name required by EXE or DLL
VFP stores in an EXE/DLL information about what runtime DLL is required to run it.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
? VfpVersionFromExeOrDll("C:\Program Files\My Company\MyVfpApplication.exe") ? VfpVersionFromExeOrDll("X:\Somefolder\MyVfpDll.dll")
* VfpVersionFromExeOrDll.PRG FUNCTION VfpVersionFromExeOrDll LPARAMETERS tcExeDllName LOCAL lcSig, lnHandle, lcVersion, lcBuffer, lnPos, lcSigMT lnHandle = FOPEN(tcExeDllName, 0) IF lnHandle < 0 ? FERROR() RETURN "Unable to Open file + '" + tcExeDllName + "'" ENDIF
Send email via MSN email account
MSN SMTP server requires SSL connection on port 25.
Sample code below uses CDO 2000 class for sending emails
| This is sample code. Add error handling and adjust to your requirements as necessary. |
* Replace addresses with real ones before running the code loMail = NEWOBJECT("Cdo2000", "Cdo2000.fxp") WITH loMail .cServer = "smtp.live.com" .nServerPort = 25 .lUseSSL = .T. .nAuthenticate = 1 && cdoBasic .cUserName = "yourAccount@live.com" .cPassword = "yourPassword" *.cFrom = "yourlAccount@live.com" .cFrom = .cUserName
Send email via Yahoo mail account
Yahoo SMTP server requires SSL connection on port 465.
Sample code below uses CDO 2000 class for sending emails
| This is sample code. Add error handling and adjust to your requirements as necessary. |
* Replace addresses with real ones before running the code loMail = NEWOBJECT("Cdo2000", "Cdo2000.fxp") WITH loMail .cServer = "smtp.mail.yahoo.com" .nServerPort = 465 .lUseSSL = .T. .nAuthenticate = 1 && cdoBasic .cUserName = "yourYahooAccount@Yahoo.com" .cPassword = "yourYahooPassword"
Remove Structural CDX or Memo flag from a table
The VFP low level file functions (LLFF) can be used to open a table as a file and read/write its header. The Table Header Record Structure is documented in VFP help under Table File Structure.
Note 1 Removing Structural CDX flag will effectively disassociate CDX file from the table but not delete the CDX file.
Note 2 Removing Memo flag will allow to open a table and access all fields excluding memo fields. Attempt to access the memo fields will generate an error.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
Deleting pages from PDF file through Acrobat automation
Detailed info on Acrobat automation can be found in Interapplication Communication API Reference from Acrobat 8.1 SDK or Acrobat 9.0 SDK at http://www.adobe.com/devnet/acrobat/?navID=downloads. Free registration may be required.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
#DEFINE PDSaveFull 1 && Write the entire file. * Original PDF file lcPdfFile = "..." * new PDF file with specified pages deleted lcNewPdfFile = "..." * Delete 3 pages starting with page 5 lnPage2DelStart = 5 lnPage2DelEnd = lnPage2DelStart + 3 * Acrobat application
VFP OLE DB provider
The VFP OLE DB Provider allows other programming languages and applications to access Visual FoxPro databases and tables.
The VFP OLE DB Provider is 32-bit dll (VfpOleDB.dll) and cannot be used by 64-bit applications.
VFP OLE DB provider can be downloaded from here. It's the same version as the one included with Visual FoxPro 9.0 SP2.
How to detect 64-bit OS
On 64-bit Windows the 32-bit Windows-based applications run under WOW64 x86 emulator. WOW64 isolates 32-bit applications from 64-bit applications, which includes preventing file and registry collisions. Console, GUI, and service applications are supported. However, 32-bit processes cannot load 64-bit DLLs, and 64-bit processes cannot load 32-bit DLLs.
Retrieve HTML from Clipboard
MSDN:
| This is sample code. Add error handling and adjust to your requirements as necessary. |
lcHtml = HtmlFromClipboard() IF NOT ISNULL(lcHtml) lnStartHTML = VAL(STREXTRACT(lcHtml, "StartHTML:", "")) lnEndHTML = VAL(STREXTRACT(lcHtml, "EndHTML:", "")) * If StartFragment is present, retrieve HTML fragment IF ("StartFragment" $ lcHtml)
Appropriate license for this class not found error at runtime
Code that runs fine in development may generate Appropriate license for this class not found (OLE error code 0x80040112) at run-time.
There are two types of licenses for ActiveX controls - development and run-time. See INFO: OLE Control Licensing in Visual FoxPro for more information.
VFP Team releases third hotfix for VFP 9.0 SP2
A hotfix for a bug in VFP 9.0 SP2 FIX: The group header of a data grouping is not printed at the top of a page as expected after you install Visual FoxPro 9.0 Service Pack 2 has been released.
Installing the hotfix will update VFP 9.0 SP2 to the version 9.0.0.7423
See Also VFP 9.0 Versions
Recent comments
12 hours 32 min ago
1 day 19 hours ago
1 day 19 hours ago
2 days 15 hours ago
2 days 22 hours ago
4 days 6 hours ago
4 days 22 hours ago
5 days 11 hours ago
1 week 1 day ago
2 weeks 5 days ago