我的應用程序(德爾福7寫)相關的正確運行在Windows XP SP3,但是當我嘗試在Windows 7上運行它出現此異常:如何解決EInvalidOperation到圖像列表
EInvalidOperation與信息「無效的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);
...
...
模塊dmImages已正確創建,如frMain,但是當 意願創建對象FR ameAnagrafica然後引發異常的構造方法:
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時出現問題。 我該如何解決這個問題?
也許你可以顯示你的一些代碼。否則,我們的幫助希望就破滅了。 – lurker
什麼版本的Delphi?圖像列表中有哪些類型的圖像?它們如何被加載到圖像列表中?如果您希望我們爲您提供幫助,您需要具體說明並提供詳細信息。我們無法看到您的代碼,無法讀懂您的想法,也無法訪問您的計算機以便從此處爲您進行調試,因此我們只能使用您提供給我們的信息來提供幫助。請[編輯]您的問題並提供更多信息。謝謝。 –
你在問我們什麼? –