Send email via MSN email account

MSN SMTP server requires SSL connection on port 25.

Send email via Yahoo mail account

Yahoo SMTP server requires SSL connection on port 465.

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.

Powershell - Benchmark Command

Powershell comes with a cmdlet called "Measure-Command" that can execute a block of commands and measure how long it takes to run. It's analogous to the unix "time" command.

What if you want to run something a number of times and take the average?

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.

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.

Retrieving Windows TaskBar Size and Location

A location and size of the Windows Taskbar can be retrieved with SHAppBarMessage Function.

Is variable or property an array?

When validating a function, procedure or method parameters, it's sometimes necessary to determine if passed parameter is an array. Until VFP 9.0 there was no obvious way to do that.

Syndicate content