答案 0 :(得分:0)
要在底部面板上创建按钮,请参阅:
How to create new About button in Inno Setup?
有关背景音乐,请参阅:
Playing sound during an Inno Setup install
要在点击按钮时停止播放音乐,只需从DSStopMediaPlay
处理程序中调用OnClick
(Inno Media Player)。
procedure AboutButtonOnClick(Sender: TObject);
begin
DSStopMediaPlay;
end;
要隐藏完成页面上的按钮,您需要保存对全局变量的按钮引用,并在CurPageChanged(wpFinished)
中设置.Visible
= false
:
[Code]
var
// Global variable
AboutButton: TNewButton;
procedure InitializeWizard;
begin
// create an instance of the button and assign it to the global variable AboutButton
AboutButton := TNewButton.Create(WizardForm);
...
end;
procedure CurPageChanged(CurPageID: Integer);
begin
// Hide button on Finished page
if CurPageID = wpFinished then
begin
AboutButton.Visible := False;
end;
end;
当然,您想要命名变量StopButton
,而不是AboutButton
。