5 Unique Delphi features for Windows 10
[SHOWTOGROUPS=4,20]
Jon Lennart Aasenden
23/1/2020
In my previous post I focused on InterBase 2020 and outlined Для просмотра ссылки Войдиили Зарегистрируйся. In this post I want to look at five awesome additions to Delphi that help you write lean, modern and fully compliant Windows 10 applications.
To the average non-technical computer user, Windows 10 might seem as just another Windows version. I still hear both non-technical users and developers ask why they should leave Windows 7 behind. What exactly is so unique about Windows 10?
In order to understand why Windows 10 is awesome, we first have to take a step back to the previous edition of Windows, namely Windows 8.
A bit of context
At the time when Windows 8 was the latest thing, Microsoft was still active in the mobile market, and Windows 8 represented a substantial refactoring of the Windows family. Microsoft made no secret of their plans to eventually retire x86 in favour of ARM (which is still a goal for both Microsoft and Apple), and in order to deliver said platform transparently, the OS was to be engineered from the ground up.
Above: QualComm produces some of the most powerful ARM SoC (system on a chip) available. The SnapDragon 800 series delivers performance close to Intel i5, yet cost a fraction of the price. The SnapDragon SoC is used in Microsoft Surface tabs, and also powers the latest Samsung Galaxy Note 10.
The result of this effort was WinRT (Windows Runtime), a chipset agnostic architecture that, once adopted, enabled developers to write applications that could be compiled for any CPU, providing the code was source-compatible (not unlike FireMonkey and its abstraction layer over desktop, mobile and embedded). The idea was initially to retire the aging WinAPI and thus make the entire Windows eco-system portable. But WinRT has not replaced WinAPI, instead it co-exists and compliments the system.
Universal Windows Platform (UWP)
Needless to say the Windows 8 journey did not go as Microsoft had planned. They took Windows Mobile off the market (which is a great shame, Windows Mobile was wonderful to use) and decided to focus on what they do best; namely the Windows desktop.
UWP (universal windows platform) can be seen as a kind of successor to WinRT. It incorporates the same technology (so WinRT is still there) except it has broader implications and embrace more diverse technologies. The most important being that it allows other languages, and developers that don't use Visual Studio to co-exist without the restrictions of Windows 8 (WinRT was C++ only). Microsoft also added an emulation layer to UWP, to make sure applications written for x86 and WinAPI can seamlessly run on ARM.
I should underline that Delphi has support for the WinRT APIs that are now an intrinsic part of Windows 10. There are some 40 units in the VCL (under the WinAPI.* namespace) that let you work directly with that aspect of Windows. As well as components written especially for Windows 10, that we will cover briefly in this post.
Right then. Lets jump into my top five features and have a closer look!
1: Scaling and DPI awareness
If you have updated to Windows 10 you have undoubtedly noticed that graphics are smoother than under Windows 8 (and especially Windows 7), and that Windows will scale form content if you are using a monitor that supports high DPI. This feature goes deeper than you might expect, because users can have both HD and SD capable monitors connected to the same machine - and Windows 10 will ensure that applications look their best regardless of DPI count.
Support for DPI awareness for monitors, has to be defined in the application manifest, but this is now a part of your project options inside the Rad Studio IDE. So making your desktop application DPI aware is nothing more than a 2-click operation.
On the component side (or form decoration if you will) you can add support for HD graphics through the latest TImageCollection and TVirtualImageList. These components simplify support for HD displays when available - and fall back to older SD (low-res) glyphs when not available.
You can read more about DPI awareness and the parts of the VCL that this affects here:
Для просмотра ссылки Войдиили Зарегистрируйся
[/SHOWTOGROUPS]
Jon Lennart Aasenden
23/1/2020
In my previous post I focused on InterBase 2020 and outlined Для просмотра ссылки Войди
To the average non-technical computer user, Windows 10 might seem as just another Windows version. I still hear both non-technical users and developers ask why they should leave Windows 7 behind. What exactly is so unique about Windows 10?
In order to understand why Windows 10 is awesome, we first have to take a step back to the previous edition of Windows, namely Windows 8.
A bit of context
At the time when Windows 8 was the latest thing, Microsoft was still active in the mobile market, and Windows 8 represented a substantial refactoring of the Windows family. Microsoft made no secret of their plans to eventually retire x86 in favour of ARM (which is still a goal for both Microsoft and Apple), and in order to deliver said platform transparently, the OS was to be engineered from the ground up.
Above: QualComm produces some of the most powerful ARM SoC (system on a chip) available. The SnapDragon 800 series delivers performance close to Intel i5, yet cost a fraction of the price. The SnapDragon SoC is used in Microsoft Surface tabs, and also powers the latest Samsung Galaxy Note 10.
The result of this effort was WinRT (Windows Runtime), a chipset agnostic architecture that, once adopted, enabled developers to write applications that could be compiled for any CPU, providing the code was source-compatible (not unlike FireMonkey and its abstraction layer over desktop, mobile and embedded). The idea was initially to retire the aging WinAPI and thus make the entire Windows eco-system portable. But WinRT has not replaced WinAPI, instead it co-exists and compliments the system.
Universal Windows Platform (UWP)
Needless to say the Windows 8 journey did not go as Microsoft had planned. They took Windows Mobile off the market (which is a great shame, Windows Mobile was wonderful to use) and decided to focus on what they do best; namely the Windows desktop.
UWP (universal windows platform) can be seen as a kind of successor to WinRT. It incorporates the same technology (so WinRT is still there) except it has broader implications and embrace more diverse technologies. The most important being that it allows other languages, and developers that don't use Visual Studio to co-exist without the restrictions of Windows 8 (WinRT was C++ only). Microsoft also added an emulation layer to UWP, to make sure applications written for x86 and WinAPI can seamlessly run on ARM.
I should underline that Delphi has support for the WinRT APIs that are now an intrinsic part of Windows 10. There are some 40 units in the VCL (under the WinAPI.* namespace) that let you work directly with that aspect of Windows. As well as components written especially for Windows 10, that we will cover briefly in this post.
Right then. Lets jump into my top five features and have a closer look!
1: Scaling and DPI awareness
If you have updated to Windows 10 you have undoubtedly noticed that graphics are smoother than under Windows 8 (and especially Windows 7), and that Windows will scale form content if you are using a monitor that supports high DPI. This feature goes deeper than you might expect, because users can have both HD and SD capable monitors connected to the same machine - and Windows 10 will ensure that applications look their best regardless of DPI count.
Support for DPI awareness for monitors, has to be defined in the application manifest, but this is now a part of your project options inside the Rad Studio IDE. So making your desktop application DPI aware is nothing more than a 2-click operation.
On the component side (or form decoration if you will) you can add support for HD graphics through the latest TImageCollection and TVirtualImageList. These components simplify support for HD displays when available - and fall back to older SD (low-res) glyphs when not available.
You can read more about DPI awareness and the parts of the VCL that this affects here:
Для просмотра ссылки Войди
[/SHOWTOGROUPS]
Последнее редактирование: