vfp8

Retrieving Printer Capabilities

In Enumerating printer forms article the DeviceCapabilities function is used to mark print forms supported by particular printer. It can be used to retrieve other printer capabilities as well.

Enumerating printer forms

Enumerating of printer forms can be done with Windows API EnumForms function. Contrary to what MSDN says, it returns the list of all printer forms on PC, not just for the specific printer. On other hand, DeviceCapabilities can return a list of supported paper sizes for the printer.

Editable checkbox in a Grid with AllowCellSelection disabled

Tagged:

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.

Converting ADO Recordset to Cursor with CursorAdapter

Tagged:

CursorAdapter can easily convert ADO recordset into VFP cursor. It does not support a conversion in opposite direction.