2012-11-03 149 views
1

我有一個問題,我需要你的幫助..我想找到一種不同的方式來放置透明的啓動畫面或我的代碼的更正。這裏的代碼工作...但有一個問題,有些人在安裝結束時出現錯誤。Inno Setup - 透明閃屏

這是如何在安裝 enter image description here

enter image description here

我檢查另一線在我的代碼的末尾查找錯誤,我發現這個問題是閃屏的代碼,如果我刪除它安裝程序工作完美,我看到我需要的是一個procedure DeinitializeSetup();,但我不知道如何把它放在啓動畫面部分,我得到這種錯誤,如果我刪除procedure DeinitializeSetup();在另一個代碼,如皮膚,標誌等..文件進入臨時文件夾的窗口...然後我需要的是procedure DeinitializeSetup();在splas H屏幕代碼來解決這個... :(這裏是任何人測試的dll文件IsUtilsHb.dll

然後......請如果有人知道一種不同的方式來放置一個透明的啓動畫面...不勝感激..或更好。要解決這個代碼段:)

[setup] 
AppName=Slash PNG 
AppVerName=1.0 
DefaultDirName={pf}\program 

[Languages] 
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" 

[Files] 
Source: IsUtilsHb.dll; DestDir: {app}; Flags: dontcopy 
Source: SplashScreen.png; DestDir: {app}; Flags: dontcopy 

[Code] 
function SplashScreen(hWnd: Integer; pathPng: String; nSleep: Integer): Integer; 
external '[email protected]:IsUtilsHb.dll stdcall'; 

procedure InitializeWizard(); 
var 
    SplashFileName: string; 
begin 
    SplashFileName := ExpandConstant('{tmp}\SplashScreen.png'); 
    ExtractTemporaryFile('SplashScreen.png'); 
    SplashScreen(StrToInt(ExpandConstant('{hwnd}')), SplashFileName, 5000); 
end; 
+0

如果您想透明的PNG動畫的幻燈片,你可以去看看['Inno Image Animator'](http://code.google.com/p/inno-image-animator/wiki/Introduction)。但如果你願意,我可以很容易地修改它只是一個圖像(作爲一個新的FOS項目)與你說的規格;-) – TLama

回答

1

尋找所有在互聯網之後,我得到了這個解決方案:

這是DLL正在使用: isgsg.dll

[setup] 
AppName=Slash PNG 
AppVerName=1.0 
DefaultDirName={pf}\program 

[Languages] 
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" 

Source: "Splash.png"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression 
Source: isgsg.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression 

[Code] 
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external '[email protected]:isgsg.dll stdcall delayload'; 

procedure InitializeWizard(); 
begin 
    ExtractTemporaryFile('Splash.png'); 
    ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFFFFF,10); 
end; 
1

只是說:

ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,3000,1000,0,255,True,$FFFFFF,10); 

解讀:

ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000(appear time),3000(show time),1000(disappear time),0(like a intermittent reload time),255(transparency 0..255),True,$FFFFFF (transparency color if not png transp),10); 

intermittent reload time = use 9999999,你看像打雷圖像