uses System.Devices;
case TDeviceInfo.ThisDevice.DeviceClass of
TDeviceInfo.TDeviceClass.Desktop:
...
TDeviceInfo.TDeviceClass.Phone:
...
TDeviceInfo.TDeviceClass.Tablet:
...
end;
TDeviceClass = (Unknown, Desktop, Phone, MediaPlayer, Tablet, Automotive, Industrial, Embedded, Watch, Glasses, Elf, Dwarf, Wizard);
本文介绍了如何使用 Delphi 的 TDeviceInfo 类来判断当前设备的类型,并针对不同的设备类型(如桌面、手机和平板等)进行相应的处理。文章还列举了 TDeviceClass 枚举的所有可能值。
3356

被折叠的 条评论
为什么被折叠?



