System.Devices.TDeviceInfo.AddDevice
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:
- ADeviceClassis the device class.
- AIDis the device identifier.
- AMaxPhysicalScreenSizeand- AMinPhysicalScreenSizeare the maximum and the minimum physical screen size. For a fixed size, you may use- APhysicalScreenSizeinstead, or provide the same value for both- AMaxPhysicalScreenSizeand- AMinPhysicalScreenSize.
- AMaxLogicalScreenSizeand- AMinLogicalScreenSizeare the maximum and the minimum logical screen size. For a fixed size, you may use- ALogicalScreenSizeinstead, or provide the same value for both- AMaxLogicalScreenSizeand- AMinLogicalScreenSize.
- APlatformis the operating system that the device runs.
- APixelsPerInchare the pixels per inch of the device screen.
- AExclusivedetermines whether the device only matches identical devices or may match devices that are different but similar when there is no better candidate.