Extended Vista Support

In this chapter we have seen that quite a number of new properties and features can only be used on the Vista version (or newer) of the Windows operating system. I think it is worth providing a short summary in this final section.

Before I get to that, though, notice that the VCL uses a new special support function, CheckWin32Version, that returns True if the version of the operating system is equal to or greater than the version passed as parameter (using one or two Integers for the major version, and optionally the minor one). This function was already in Delphi 2007, but I had missed it in my book (and didn't see it used too often in the VCL source code).

As an example, look at the following snippet, which I added to the UniClipboard program (even if it is totally unrelated):

if CheckWin32Version(6) then

ShowMessage ('Running on Windows Vista or later'); if CheckWin32Version(5) then

ShowMessage ( 'Running on Windows 2000 or later');

In Delphi 2007 the VCL introduced Vista support, provided task dialogs (with redirection of standard messages and the TaskDialog component), the GlassFrame property, enhanced common dialogs (again with new components and a partial redirection of the existing ones), improvements in themes support in the management of the minimized main form, with the MainFormOnTaskbar property of the Application global object.

On top of these features, that already make programs integrate smoothly with the latest version of the Windows operating system, Delphi 2009 includes the following Vista-specific features:

  • The GlowSize property of the Label component.
  • The elevation, command link, and drop down menu support for the Button control.
  • Smooth reverse support for the ProgressBar control.
  • Text hints for the ComboBox component.
  • Some extended grouping features of the ListView control.
  • Themed hint windows.

Finally a helpful feature for Vista support is the new Application global object setting for the default font to be used by each form of an application. This is significant as Vista has a new default font (Segoe UI), compared to Windows XP (and earlier versions).

Was this article helpful?

0 0
Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment