Device CapabititiesDevice-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:
|The device driver version.
|Width, in millimeters, of the physical screen.
|Height, in millimeters, of the physical screen.
|Width, in pixels, of the screen; or for printers, the width, in pixels, of the printable area of the page.
|Height, in raster lines, of the screen; or for printers, the height, in pixels, of the printable area of the page.
|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.
|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.
|Number of adjacent color bits for each pixel.
|Number of color planes.
|Number of device-specific brushes.
|Number of device-specific pens.
|Number of device-specific fonts.
|Number of entries in the device's color table, if the device has a color depth of no more than 8 bits per pixel.
|Relative width of a device pixel used for line drawing.
|Relative height of a device pixel used for line drawing.
|Diagonal width of the device pixel used for line drawing.
|Flag that indicates the clipping capabilities of the device.
|Number of entries in the system palette.
|Number of reserved entries in the system palette.
|Actual color resolution of the device, in bits per pixel.
|For printing devices: the width of the physical page, in device units.
|For printing devices: the height of the physical page, in device units.
|For printing devices: the distance from the left edge of the physical page to the left edge of the printable area, in device units.
|For printing devices: the distance from the top edge of the physical page to the top edge of the printable area, in device units.
|For display devices: the current vertical refresh rate of the device, in cycles per second (Hz).
|Scaling factor for the x-axis of the printer.
|Scaling factor for the y-axis of the printer.
|Preferred horizontal drawing alignment, expressed as a multiple of pixels.
|Value that indicates the shading and blending capabilities of the device.
|Value that indicates the raster capabilities of the device.
|Value that indicates the curve capabilities of the device.
|Value that indicates the line capabilities of the device.
|Value that indicates the polygon capabilities of the device.
|Value that indicates the text capabilities of the device.
|Value that indicates the color management capabilities of the device.
Device Capabilities component suite includes demo project that demonstrates main features of TDeviceCapabilities component: