私のアプリケーション (Delphi 7 で作成) は Windows XP SP3 で正しく動作しますが、Windows 7 で実行しようとすると、次の例外が発生します。
EInvalidOperation とメッセージ「Invalid ImageList」
これはメインのアプリケーション コードです。
Application.Initialize;
tmpSplash.GoNextMsg;
Application.CreateForm(TdmImages, dmImages);
tmpSplash.GoNextMsg; // Collegamento database
Application.CreateForm(TdmCharter, dmCharter);
tmpSplash.GoNextMsg; // Caricamento immagini
Application.CreateForm(TfrMain, frMain);
tmpSplash.GoNextMsg; // init: Anagrafica
frameAnagrafica := TframeAnagrafica.Create(Application);
tmpSplash.GoNextMsg; // init: Flotta
frameFlotta := TframeFlotta.Create(Application);
//Application.CreateForm(TframeFlotta, frameFlotta);
...
...
frMain などのモジュール dmImages は正しく作成されていますが、オブジェクト frameAnagrafica が作成されると、コンストラクター メソッドで例外が発生します。
type
TframeAnagrafica = class(TMyCustomFrame)
...
...
{$R *.dfm}
constructor TframeAnagrafica.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
end;
TframeAnagrafica の「スーパークラス」:
TMyCustomFrame = class(TFrame)
...
...
{$R *.dfm}
constructor TMyCustomFrame.Create(AOwner: TComponent);
begin
inherited Create(AOwner); <-- Exception here
end;
Windows XP では問題ありませんが、Windows 7 を使用すると問題が発生します。この問題を解決するにはどうすればよいですか?