System.Devices.TDeviceInfo.AddDevice

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

class function AddDevice(ADeviceClass: TDeviceClass; const AID: string;
const APhysicalScreenSize, ALogicalScreenSize: TSize; APlatform: TOSVersion.TPlatform; APixelsPerInch: Integer;
AExclusive: Boolean = False): TDeviceInfo; overload;
class function AddDevice(ADeviceClass: TDeviceClass; const AID: string;
const AMinPhysicalScreenSize, AMinLogicalScreenSize, AMaxPhysicalScreenSize, AMaxLogicalScreenSize: TSize;
APlatform: TOSVersion.TPlatform; APixelsPerInch: Integer; AExclusive: Boolean = False): TDeviceInfo; overload;

C++

__classmethod TDeviceInfo* __fastcall AddDevice(TDeviceClass ADeviceClass, const System::UnicodeString AID, const System::Types::TSize &APhysicalScreenSize, const System::Types::TSize &ALogicalScreenSize, System::Sysutils::TOSVersion::TPlatform APlatform, int APixelsPerInch, bool AExclusive = false)/* overload */;
__classmethod TDeviceInfo* __fastcall AddDevice(TDeviceClass ADeviceClass, const System::UnicodeString AID, const System::Types::TSize &AMinPhysicalScreenSize, const System::Types::TSize &AMinLogicalScreenSize, const System::Types::TSize &AMaxPhysicalScreenSize, const System::Types::TSize &AMaxLogicalScreenSize, System::Sysutils::TOSVersion::TPlatform APlatform, int APixelsPerInch, bool AExclusive = false)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Devices.pas
System.Devices.hpp
System.Devices TDeviceInfo

Description

Creates an device with the specified data, adds the created device to the list of devices, and returns the created device.

AddDevice receives the following parameters:

  • ADeviceClass is the device class.
  • AID is the device identifier.
  • AMaxPhysicalScreenSize and AMinPhysicalScreenSize are the maximum and the minimum physical screen size. For a fixed size, you may use APhysicalScreenSize instead, or provide the same value for both AMaxPhysicalScreenSize and AMinPhysicalScreenSize.
  • AMaxLogicalScreenSize and AMinLogicalScreenSize are the maximum and the minimum logical screen size. For a fixed size, you may use ALogicalScreenSize instead, or provide the same value for both AMaxLogicalScreenSize and AMinLogicalScreenSize.
  • APlatform is the operating system that the device runs.
  • APixelsPerInch are the pixels per inch of the device screen.
  • AExclusive determines whether the device only matches identical devices or may match devices that are different but similar when there is no better candidate.

See Also