Device Capabitities

Device-Specific Information Component for VCL

For all versions of Delphi and C++ Builder from 3 to 10.2 Tokyo and for all versions of Windows from XP to 10


Device Capabitities component retrieves device-specific information for the specified device. You can get information for display, printer and for any window and device context (DC).

Drop TDeviceCapabilities component onto any form, choose CurrentDevice property and get any device capability information immediately using read-only properties of the component. When CurrentDevice is cdDisplay, the information about display is returned, to get printer capabilities set CurrentDevice to cdPrinter. You can also analyse your own device context or window from Handle property. If CurrentDevice is cdDC, the Handle is interpeted as device context handle. If you need to analyse device context of some window, assign handle of window to Handle property and set CurrentDevice to cdWindow.

DeviceCapabilities has the following information properties:

Property     Retreived information
DriverVersion The device driver version.
Technology Device technology.
HorzSize Width, in millimeters, of the physical screen.
VertSize Height, in millimeters, of the physical screen.
HorzRes Width, in pixels, of the screen; or for printers, the width, in pixels, of the printable area of the page.
VertRes Height, in raster lines, of the screen; or for printers, the height, in pixels, of the printable area of the page.
LogPixelsX Number of pixels per logical inch along the screen width. In a system with multiple display monitors, this value is the same for all monitors.
LogPixelsY Number of pixels per logical inch along the screen height. In a system with multiple display monitors, this value is the same for all monitors.
BitsPixel Number of adjacent color bits for each pixel.
ColorPlanes Number of color planes.
NumBrushes Number of device-specific brushes.
NumPens Number of device-specific pens.
NumFonts Number of device-specific fonts.
NumColors Number of entries in the device's color table, if the device has a color depth of no more than 8 bits per pixel.
AspectX Relative width of a device pixel used for line drawing.
AspectY Relative height of a device pixel used for line drawing.
AspectXY Diagonal width of the device pixel used for line drawing.
ClipCaps Flag that indicates the clipping capabilities of the device.
SizePalette Number of entries in the system palette.
NumReserved Number of reserved entries in the system palette.
ColorRes Actual color resolution of the device, in bits per pixel.
PhysicalWidth For printing devices: the width of the physical page, in device units.
PhysicalHeight For printing devices: the height of the physical page, in device units.
PhysicalOffsetX For printing devices: the distance from the left edge of the physical page to the left edge of the printable area, in device units.
PhysicalOffsetY For printing devices: the distance from the top edge of the physical page to the top edge of the printable area, in device units.
VRefresh For display devices: the current vertical refresh rate of the device, in cycles per second (Hz).
ScalingFactorX Scaling factor for the x-axis of the printer.
ScalingFactorY Scaling factor for the y-axis of the printer.
BltAlignment Preferred horizontal drawing alignment, expressed as a multiple of pixels.
ShadingBlendingCaps Value that indicates the shading and blending capabilities of the device.
RasterCaps Value that indicates the raster capabilities of the device.
CurveCaps Value that indicates the curve capabilities of the device.
LineCaps Value that indicates the line capabilities of the device.
PolygonalCaps Value that indicates the polygon capabilities of the device.
TextCaps Value that indicates the text capabilities of the device.
ColorManagementCaps Value that indicates the color management capabilities of the device.

Device Capabilities component suite includes demo project that demonstrates main features of TDeviceCapabilities component:

Device Capabilities component demo


Download free demo, order full source code right now!