Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

The Visual FoxPro Toolkit for .NET : Page 2

Visual Studio .NET offers a rich tool set, but anyone who has ever used Visual FoxPro will soon notice that many of their favorite features are not available. However, a new set of public domain classes can add these functions to both Visual Basic .NET and C#.


advertisement
What's in the VFP Toolkit?
This is as complete a toolkit as you could ask for... and did I mention that it is free?
As mentioned, the VFP Toolkit classes consist of many different functions that mimic features in Visual FoxPro. However, these are all written in .NET managed code. The toolkit is comprised of a single DLL of only 56K in size. It is a true .NET assembly, not a COM wrapper for VFP, and does not require VFP to be installed. In addition to the toolkit itself, the source code for both C# and VB.NET is also available. The toolkit ZIP file consists of a .DLL, a CHM help file, an XML dynamic help resource and a batch file for installing the toolkit. This is as complete a toolkit as you could ask for, and the development team is to be commended for the work they put into it. The toolkit namespace consists of the following classes:

  • Arrays—Functions for manipulating arrays, including resizing, scanning, sorting, etc.
  • Common—One of two "miscellaneous" classes, which includes commonly used functions such as variable typing and value testing.
  • Dates—Various functions for setting and changing data values, including extracting date portions.
  • Dialogs—Functions for using Windows dialogs.
  • Environment—Functions for retrieving system environment information, such as disk space, printer information, window attributes, etc.
  • Files—Functions for the low-level handling of folders and files.
  • Help—The other "miscellaneous" class, including immediate IF and object creation functions.
  • Math—Functions for handling mathematic and number-related operations.
  • Strings—Functions for manipulating strings.
  • VfpData—Functions that simulate many of the VFP data handling features.
Not all of the functions contained in these classes are written totally from scratch. Many simply call the function appropriate to either VB.NET or C# (I call these "redirection" functions). The following table provides an overview of the functions (bold text indicates totally new functions while normal text indicates redirection functions).
Arrays ACopy, ADel, ADir, AFont, AIns, ALen, ALines, APrinters, AScan, ASort
Common Between, CPConvert, CPCurrent, Empty, GetPEM, InList, IsBlank, IsNull, KeyBoard*, NVL, Parameters, PCount, RGB, Type, Vartype
Dates CDOW, CMonth, CTOD, CTOT, Date, DateTime, Day, DMY, DOW, DTOC, DTOS, DTOT, GoMonth, Hour, MDY, Minute, Month, Quarter, Sec, Seconds, Time, TTOC, TTOD, Week, Year
Dialogs GetColor*, GetDir*, GetFile*, GetFont*, GetPict*, GetPrinter*, LocFile*, MessageBox*, PutFile*
Environment CapsLog, DiskSpace, DriveType, GetEnv, ID, InsMode, IsMouse*, NumLock, OS, PrintStatus*, PrtInfo*, Sys, SysMetric*, Version, WBorder*, WDockable*, WFont*, WMaximum*, WMinimum*, WOnTop*, WParent*, WTitle*, WVisible*, _ClipText*, _DblClick
Files AddBS, AGetFile, CurDir, DefaultExt, Directory, DisplayPath, FChSize, FClose, FCreate, FDate, FEOF, FFlush, File, FOpen, ForceExt, ForcePath, FPuts, FRead, FSeek, FTime, FullPath, FWrite, Home*, JustDrive, JustExt, JustFName, JustPath, JustStem
Help CreateObject, CreateObjectEX, Do, DoDefault, EditSource, GetInterface, GetObject, IIF, NewObject, _Screen
Math Abs, ACos, ASin, ATan, Atn2, BitAnd, BitLShift, NitNot, BitOr, BitRShift, BitTest, Ceiling, Cos, DTOR, Exp, Floor, Int, Log, Log10, Max, Min, Mod, MTON, NTOM, Pi, Random, Round, RTOD, Sign, Sin, Sqrt, Tan
Strings AllTrim, Asc, At, AtC, AtCLine, Chr, ChrTran, CreateBinary, FileToStri, GetWordCount, GetWordNum, IsAlpha, IsDigit, IsLower, IsUpper, Left, Len, Lower, LTrim, MemLines, MLine, Occurs, PadC, PadL, PadR, Proper, RAt, RAtLine, Replicate, Right, RTrim, Space, Str, StrExtract, StrToFile, StrTran, Stuff, SubStr, Trim, Upper, Val
VfpData Alias, AppendBlank, BOF, Browse*, Count, CursorToXML, CurVal, Delete, DeleteAll, Deleted, DeleteFor, Descending, EOF, FCount, Field, Filter, Found, IndexSeek, IsReadOnly, Lookup, Order, Recall, RecCount, Seek, Select, Set, SetFilterTo, SetOrderTo, SqlConnect, SqlDisconnect, SqlExecute, SqlStringConnect, XMLToCursor

 * Functions available only for Windows Forms, and not for Web Forms


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date