Blogs

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.

Keyboard Input Virtual-Key Codes

Virtual-Key Codes constants for Windows API Keyboard Input functions

* Virtual Keys, Standard Set
#DEFINE VK_LBUTTON 0x01
#DEFINE VK_RBUTTON 0x02
#DEFINE VK_CANCEL 0x03
#DEFINE VK_MBUTTON 0x04 && NOT contiguous with L & RBUTTON

#DEFINE VK_XBUTTON1 0x05 && NOT contiguous with L & RBUTTON
#DEFINE VK_XBUTTON2 0x06 && NOT contiguous with L & RBUTTON

* 0x07 : unassigned

VFP 9.0 Versions

VFP 9.0 version information for service packs and hotfixes.

Verify ActiveX presence and registration

An ActiveX installation on PC can be verified by finding its ProgID from OleClass property in the registry.

Add and delete custom printer forms

To distribute applications that use reports with custom paper size you have to create custom printer forms on every destination PC that runs Windows 2000 or later. The MS KB article Q157172 explains how it can be done manually. However there's a way to do that programmatically using Windows API.

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.

Get number of jobs in print queue

The number of jobs in print queue can be retrieved by simplified version of Enumerating jobs in print queue

Enumerating jobs in print queue

Enumerating jobs in a print queue can be done with

Pages

Subscribe to RSS - blogs