开发者

Compatibility on WinXP and Vista

开发者 https://www.devze.com 2022-12-18 20:21 出处:网络
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 wor

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 i开发者_开发技巧t 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:

  1. You can run Delphi 7 on Windows Vista
  2. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消