Ordinal Numbers

topic: 

Ordinal numbers refer to a position in a series and usually are presented as a number and one of the suffixes -th, -st, -nd and -rd.

Document Properties in Microsoft Office Word and Excel

Document properties, both built-in and custom, are a Microsoft Office-wide feature. The Word 2003 and Microsoft Office Excel expose document properties and provide the same way to work with them. These properties provide a powerful way to add and track specific information for a document.

Who has files open on the network

topic: 

The WhoHasFileOpen

utility displays the list of users who have specific file(s) open on network. Works on Windows NT Platform (Windows NT 4.0, Windows 2000, etc). This code detects only the files opened using a net shared path. It does not return the files opened by a user on the local computer using a local path.

Position Shortcut menu over Toolbar

topic: 

The code below shows how to position a shortcut menu over a toolbar buttons using GetCursorPos function and ScreenToClient function

. The idea was provided by Andrey Davidoff on UT in the message #913121.

Enumerating Environment variables

topic: 

One of the way to enumerate the Environment Variables is by accessing _environ global variable. The GetEnvironmentStrings function provides another way by returning a pointer to the environment block of the calling process. It can also be done using WMI Win32_Environment Class.

Check for active Internet connection

topic: 

The InternetCheckConnection function can be used to check for an active connection to the internet. It requires an URL to a fast and reliable web site as the first parameter.

Retrieving Extended File Properties

topic: 

When you right-click a file in Windows Explorer and select Properties from the shortcut menu, a dialog box displays basic properties for that file, including such things as file name, file size, and the file creation, last access, and last modification dates. In addition to these basic properties, the Windows operating system also tracks a number of extended file properties. These properties are typically hidden; to display them in Windows Explorer, you must click View, click Choose Details, and then select the desired properties from the resulting dialog box.

The Shell Folder object includes a GetDetailsOf method that allows to access these extended properties. A ParseName method

can be used to retrieve a FolderItem object that represents a specified item.

Flash Application window or/and Taskbar button

topic: 

Sometimes it's necessary to attract a user attention to an application that is currently not active. Such application can utilize FlashWindowEx Function. The Windows API support class

is used to handle Windows API structures.

Lowering memory usage by application

topic: 

The working set of a process is the set of memory pages currently visible to the process in physical RAM memory. These pages are resident and available for an application to use without triggering a page fault. While increasing your working set size can reduce paging for your application, it can adversely affect the system performance.

VFP is know in using all the memory it can get. One of proactive steps in reducing memory usage is limiting VFP buffers size using SYS(3050) - Set Buffer Memory Size. It's a good idea to empty the working set when your application goes into a wait state. It can be done by calling EmptyWorkingSet Function or SetProcessWorkingSetSize Function and uses GetCurrentProcess Function

.

Visual FoxPro ODBC driver

Visual FoxPro ODBC driver was last updated around VFP6 SP3. It supports a subset of VFP 6.0 features but not any new ones introduced in VFP7 and later. See VFP 6.0 Help file and Unsupported Visual FoxPro Commands and Functions (Visual FoxPro ODBC Driver) for additional information. It'll not recognize any tables that use VFP7 and later new features and either ignore them or give an error when trying to access them.

Pages