Monthly Archives: September 2012

This is a class for password gestures. You can get more information about password gestures at http://www.tested.com/news/news/3305-windows-8-turns-gestures-into-powerful-passwords/. The class I have created incorporates clicks and lines. Arcs are not implemented in this class.

This class has 2 properties
showClicks - Make it .T. to when setting password so user can see what is happening. Make it .F. when user is being authenticated.
allowedError - The size in pixel of the grid. The bigger, the easier it is to enter, but the less number of square and so less secure

The class has 3 method
setImage - Sets the image.… Continue reading

I have created a class to convert VFP to Excel. It does not need anything to be installed as it does not use Excel Automation or any OLE DB driver. It however creates Excel XML file so can only be read by Office 2003 and later.

Since it is a VFP only code, it can be subclassed and you can do things like create formatted excel workbooks. You can check out http://msdn.microsoft.com/en-us/library/aa140066.aspx for the XML definitions.

This class uses code from Alejandro Sosa ExcelListener.

LATER Updated the class so it saves the XML in chunks of 5MB to prevent "String too Long" error.

vfp2excel

Define Functions

Function definition in Javascript is similar to VFP or any c language. You can define function with

function FunctionName(parameter list){
Body of function
}

eg.

function max(a,b){
if (a>b)
return a;
else
return b;
}

Which would be the equivalent of VFP function
Function max(a,b)
If a>b
Return a
Else
Return b
Endif

Functions as objects

In javascript, functions are objects and can be assigned to variables or send to other functions as parameters. This is a concept totally different from anything in VFP. A similar functionality in VFP would require macro substitution.
eg. To start a timer,… Continue reading