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:
ADeviceClass
is the device class.AID
is the device identifier.AMaxPhysicalScreenSize
andAMinPhysicalScreenSize
are the maximum and the minimum physical screen sizes. For a fixed size, you may useAPhysicalScreenSize
instead, or provide the same value for bothAMaxPhysicalScreenSize
andAMinPhysicalScreenSize
.AMaxLogicalScreenSize
andAMinLogicalScreenSize
are the maximum and the minimum logical screen size. For a fixed size, you may useALogicalScreenSize
instead, or provide the same value for bothAMaxLogicalScreenSize
andAMinLogicalScreenSize
.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.