"TFileOpenDialog requires Windows Vista or later" - delphi

I have tried to use the new TFileOpenDialog and now my application is not compatible with Windows XP anymore. I find out that TFileOpenDialog only works on Vista and 7. It seems that TFileOpenDialogand does not check if it is running under Win XP in order to automatically and silently downgrade to TOpenFileDialog. Instead it just shows an error message. There is something I am missing? There is a wrapper that offers this functionality or I have to switch back to the classic TOpenFileDialog?
I don't understand why Embarcadero had to toss Borland's help system and build a new one (much worst) from zero.

Use TOpenDialog and set UseLatestCommonDialogs to true. You don't get the new (Vista and up) properties (like OkButtonLabel) but at least the look and feel will be fine from a user's POV...

Yes, it is called TOpenDialog.

Related

How to resolve "ITaskbarList3 interface is not supported on this OS version" on XE6

Delphi XE6 raises
ITaskbarList3 interface is not supported on this OS version
error at runtime on Vista and XP. It is a known issue in Quality Central and resolved in XE7.
The error comes when the TTaskbar VCL component is placed on a TForm and the application is run on OS prior to Windows 7 (such as Vista or XP).
How one can work around this in XE6?
This interface was introduced in Windows 7. It is not implemented by earlier versions. The requirements section of the documentation makes this clear. This is of course eminently reasonable since the interface encapsulates functionality that does not exist in Vista and earlier.
On a platform lower than Windows 7 you should not attempt to use this interface. My guess, although you do not state it, is that you are using a VCL wrapper around this interface, rather than the interface itself. All the same, the solution is the same. Avoid the component, or at least the code path, that uses the interface in question.
So, if you encounter the problem because you used TTaskbar, make sure that you don't use TTaskbar when the program runs on a system that does not support ITaskbarList3. Likely this means no longer creating the component using the form designer and instead doing so, conditionally, using runtime code.

New TFrame and TDataModule crashing Delphi IDE

Here is the problem I've met:
Working in BDS 2006 IDE, my older computer gone, new ( i7 mount ) has been built and it has Windows 7 Ult OS 64bit, where 2006 was installed and QuickReports Pro as well as eDocEngine, FIB+, TMS, LMD, ZEOS & DB Comparer Component Packs - I use them in my products.
On computer I have Office 2010 installed as well, by default in 32bit version and Adobe CS6. That's it.
After installation I tried few times reinstall RAD 2009 and anyway, always the same problem, to simplify it is 100% reproducable like that:
Create new Delphi VCL Forms application ;
Click File / New / Other and goto, say, "Delphi files" and select Frame or DataModule. When new file is created, all the time we have message:
"Stack overflow - save your work and restart Delphi for Microsoft Windows"
After that IDE set in bad state and next F12 ( show VCL designer) closes Delphi with General Error.
Any idea what happens?
As I said, I tried few time uninstall - install 2006, start in any personality, use / do not use any of the updates or IDE fixes from Andy's site, nothing helps.
Any help would be greatly appreciated.
You can try running a second instance of the IDE in the debugger.
Create an empty dll or package project.
Open Run > Parameters
Set the host application to $(BDS)\bin\BDS.exe
Then just hit F9 to run the second instance of the IDE in the debugger. After that just follow the steps to reproduce the problem and wait for the exception. If all goes well you'll get a complete call stack to step through.
Note: You may see various other exceptions occurring as the IDE loads. These are normal and can usually be ignored.
Also you didn't mention what version of Windows was on your old machine. If it was Windows XP Uwe could be right. XP was a little more lax on security by default than Vista or 7. The new default is to restrict write access to any folder under Program Files. If that turns out to be the problem you can adjust the write permissions for $(BDS) for whatever user account you use for development.
Delete de PackageCache in Embarcadero registry entries. Its not a complete solution but worked for me.
Got that from here: http://qc.embarcadero.com/wc/qcmain.aspx?d=118669 (last answer).
I have no BDS 2006 at hand, but is it possible that the default folder for new projects is located below the Program Files folder? In that case there might be no write access to that folder.

Application portablity between Windows versions

I have an Delphi 7 Application that uses Halcyon dbf component. It works well in Windows ME.
Unfortunately in Windows XP data aware controls which are bound to Halcyon xBase Engine do not behave correctly. In addition pack command almost hangs the application. I tried compiling in XP. But no joy. Does that mean that API calls work differently? May be Data types mean different things....
Thanks for all help
A well written Delphi 7 application will work on any version of WIndows from 98 onwards. If you have managed to make an application that doesn't work on XP, then you should debug the problem on XP, not recompile and then give up. (no joy!? what? you're done already? Is that how you troubleshoot and debug?).
For posterity I should point out that if you change Delphi versions then of course, some things change. For example, If you build your Delphi application in Delphi 2009 or later, it will work properly on Windows XP, but not on Windows 98 or ME any more. But if you build your application using the same version of Delphi, why would you expect any changes in the application's bugs?
As David says; Rebuilding your application on a different computer, from the same code, and with the same compiler, produces the same binary. If you have a fundamental problem on Windows XP it is because you made a mistake in your code somewhere.
In general, windows 98/ME to 2000/XP was an easy transition, but that was a decade ago.
The only API I remember that was in Windows 98/ME that was not in XP, was the Windows 98 text-to-speech API which was removed and replaced with a different API in XP.
I believe your confusion is that windows contains something that affects Data Aware controls. It does not. Data Aware Controls are a purely Delphi thing, and they are not a part of Windows XP, they are 100% implemented inside Delphi. If you have some funny custom control that is badly written, perhaps it might not work. We have no idea what your code contains, and you haven't even described the nature of the failure.
You need to provide more information, or this question should be closed as unanswerable, or too localized. (My app doesn't work! Help! No other info given.)

Compatibility on WinXP and Vista

I developed an application using also third party components (developed on D7, WinXP).
When I deploy this application on XP everything works fine. When I run it on Vista, the application cease to work properly:
Toolbuttons on Toolbar does not size equally, when I switch visibility on/off, thats why (third party) skins are not properly nested and then it looks ugly. It bothers, it's annoying but it is not fatal as the next point.
Third party text processing component cease to write. I wrote some routines, which allows writing on this component under certain circumstances. It was a big shock to find out, that I can not write anything (probably these routines return false for writing, but I do not see any reason, why on XP it should work fine, but on Vista not).
The application runs (at last), but not in the way, like it supposed to !!!!
I would like to debug it, but how?
Should I install Delphi 7 on this problematic Vista computer and compile project on it? (this is it, what I am going to do...)
Is it problem of third party components?
Is there any possibility to use some compiler directives to ensure, that application will run on Vista flawless ? (be honest I do not know if Vista is to claim in general).
Is Delphi 7 too old for Vista?
NOTE:
When I run the same application on Win98, I get error message about invalid floating point operation...
Has anybody solved such problem?
Thanks
If Delphi 7 is compatible with Windows Vista, it only really means one or both of the following:
You can run Delphi 7 on Windows Vista
Delphi 7 can be used to write programs that can run on Windows Vista
It does not automatically mean that
All programs I create in Delphi 7 runs on Windows Vista
All programs I create in Delphi 7 runs properly on Windows Vista
Let me give you an analogy: That you can use a hammer to get a nail into your wall without hurting yourself does not mean that no matter what you do, you won't hurt yourself.
If your program, either in your own code, or as part of the third party components you use, use parts of Windows that has changed or possibly even been removed (although that's far less), then you need to fix your program, there's no way around it.
There's no silver bullet either, so no compiler directives or whatnot. The most I can think of is that perhaps Windows Vista has some compatibility settings for the shortcuts that might turn on some XP-compatibility layer in Vista that fixes the particular issues you have.
However, the only long-term solution is to change your program so that it is properly compatible with Windows Vista, and probably Windows 7 as well.
Since you say you're using third-party components, have you verified if the particular versions of them that you use happen to be Vista-compatible? You need to go check on the websites of the authors to find that. Perhaps it can be solved by simply upgrading those components.
However, it might also be that you need to make changes to your own code.
The best way to move forward is to install Vista and possibly Windows 7 and start debugging to try to find the underlying cause of the problems.
Note that just installing Delphi 7 on Vista and recompiling will not fix anything. The compiler does not produce a different program if you compile it on a particular Windows version. Only changes to the code will apply the necessary changes.
The easiest solution is to make sure your Delphi version and 3rd party components are Vista compatible.
Delphi versions since 2007 are.
Recent TMS, DevExpress and Raize components are.
The hard solution is to do all the changes yourself.
Be prepared to modify the VCL sources from 2002, carefully modify them to bring them up to Delphi 2007 level.
Then do the same for your 3rd party components.
--jeroen
I never really investigated, but I noted that in some apps that I have, in all skinned modes (XP-teletubbie, and Vista/W7 non classic) I had paint artifacts with all delphi verrsions if I put buttons and labels directly on tframes or ttabsheets.
The problems went away when I inserted a panel inbetween.

How to set Delphi bookmarks on Vista 64-bit

In Delphi (2007) I'm used to setting a bookmark with CTRL-SHIFT-0,1,2 etc.
Since I've upgraded to Vista x64 the above no longer works. I can still set a bookmark with CTRL-K-0,1,2 etc but I'm habituated to the traditional way (plus it's quicker).
Does anyone know why it's not working for me?
I had the same problem. Some more investigation showed that it is caused by a change in Vista.
Input method editor keyboard shortcut (CTRL+SHIFT+0) switches the input language in Vista. The following link shows how to disable this shortcut and thereby make it available to other applications (including Delphi) again: http://support.microsoft.com/kb/967893.
I am running on Windows 2008 Server 64-Bit (which is based on Vista) and I use CTRL+SHIFT+1 to set book marks and it works fine. At home I have Vista 32-Bit and that works fine too.
You might check to make sure your OEM didn't install some crazy keyboard hook on that or something. I've had that happen before where some key combinations were remapped by a background program and it prevented them from working in Delphi.
Programmers use a lot more key combinations then most "normal" users.
Verify that you don't have system wide hot keys that conflict with those. I had the same problem with Trillian hijacking some Delphi shortcuts.
As already mentioned, Vista is using that key combination.
If you don't want to disable it, Ctrl+K CTRL+0 is the old school method to set bookmark 0.

Resources