Enumerating IE instances

topic: 

The Windows Shell

provides a powerful set of automation objects that enable you to access the file system, launch programs, and change system settings.

The Shell Windows Method

creates and returns a ShellWindows object that represents a collection of all of the open windows that belong to the Shell, including Internet Explorer.

Enumerate Available Drives

The code below demonstrates the use of the DRIVETYPE() function.

Editable checkbox in a Grid with AllowCellSelection disabled

The GridHitTest method can be used to to determine where user clicked on the grid and update checkbox accordingly. Note that checkbox status can be changed by mouse only because there's no current cell when AllowCellSelection=.F.

Difference between FUNCTION and PROCEDURE statements

Syntactically there is no difference between FUNCTION and PROCEDURE statements in VFP. In other languages, that have both statements, a function can return a value and a procedure cannot. In VFP the difference comes in the way a procedure/function is called. By default VFP passes parameters by value in call to the functions, by reference to the procedures ( DO ...) and only former allows for a return value.

Determine Printer Margins Programmatically

The GetDeviceCaps function can be used to retrieve printer-specific information as demonstrated below.

Determine Invalid Characters in File Name and Path

This is sample code. Add error handling and adjust to your requirements as necessary.

Detect Multiple Monitors

The GetSystemMetrics WIN API can be used to get the number of monitors. Some other constants related to multi-monitor PC configurations are also included.

Pages