I've noticed that Windows 7 is more compatible with old Delphi applications than Vista. Here are two cases I found (mostly while giving my talk on Windows 7 at EKON last Tuesday).

The first relates with the preview of the application main form available in Windows Flip (the task bar preview), Windows Flip 3D, or even the plain list of windows you obtain using Alt+Tab keys. In Vista, a traditional Delphi application would have been represented by its icon when it was minimized and displayed in any of these views. The fix came to the VCL in Delphi 2007 with the MainFormOnTaskbar property of the TApplication class. In Windows 7, however, a traditional Delphi application would show properly in the various previews, even when minimized. This basically means that the MainFormOnTaskbar property becomes much less relevant, although it will still affect the title displayed for the application in the taskbar. With older versions of Delphi, or in case the property is set to False, the title will match the Title property of the Application global object; on the other hand, if MainFormOnTaskbar is set to True, the title is the Caption of the main form.

Another relevant change relates to the behavior of Windows Resource Protection and Virtual Storage (the area created for each user to host the document and configuration files that old “non-themed” applications save in Program Files sub-folders or in the Windows folder). Windows 7 expands the virtual storage area to include the root of the C: drive. As an example, the FileAccess program discussed in my “Delphi 2007 Handbook” tried to save a file to the root of the C: drive with the code: "Memo1.Lines.SaveToFile ('C:\SomeText.txt');". In Vista this code used to fail with an error both for a themed and a non-themed application, in Windows 7 the themed application succeeds and saves the file to the basic folder of the virtual storage area, which on my computer (for my account) is: C:\Users\Marco\AppData\Local\VirtualStore.

So, with all fanfare saying you have to move to .NET to build Windows applications, Microsoft is putting extra effort to let old Delphi (and I suspect, Visual Basic 6) programs work better with the latest version of their operating system. Maybe I missed other extended compatibilities (or incompatibilties) between Delphi programs and Vista, fell free to share others on the blog or email me.

PS. Delphi 2010 offers native support for a number of interesting new features of Windows 7, covered in my talk and part of my coming "Delphi 2010 Handbook". These are all native or COM libraries, so no .NET required either. But that's a different story.