Chuvakstepan  Цитата: Нужно чтобы три кнопки управления музыкой меняли свое расположение так же как форма процесса инсталляции (внизу справа, см. руководство). А то окошко инсталляции стало маленьким, и не видно кнопок, хотя они есть
  У меня можно сказать так получилось [но очень коряво - но суть есть], 
НО много всяких косяков. Например - после завершения установки [страница wpFinished] окно мастера установки должно вернуться на место а именно в центр и вернуть свой исходный размер - но почемуто не получается.   
 [more=Вот мои на роботки]  
Код:   [Setup]   
 AppName=My Program   
 AppVerName=My Program version 1.5   
 DefaultDirName={pf}\My Program     
 [Files]   
 ;Библиотека для возможности проигрывания .mp3 музыки 
 Source: "bass.dll"; DestDir: "{tmp}"; Flags: dontcopy noencryption nocompression   
 ;.mp3 музыка 
 Source: "Human1.mp3"; DestDir: "{tmp}"; Flags: dontcopy noencryption nocompression   
 [Code] 
 const 
   BACKGROUND = 6; // "5"-по центру, "6"-растянуто на весь экран, "1,2,3,4"-в разных углах экрана 
   TIMER = 16;   
   BASS_ACTIVE_STOPPED = 0; 
   BASS_ACTIVE_PLAYING = 1; 
   BASS_ACTIVE_STALLED = 2; 
   BASS_ACTIVE_PAUSED = 3; 
   BASS_SAMPLE_LOOP = 4;   
 var 
   mp3Handle: HWND; 
   mp3Name: string; 
   Splash: TSetupForm;     
 function BASS_Init(device: Integer; freq, flags: DWORD; win: hwnd; CLSID: Integer): Boolean; 
   external 'BASS_Init@files:BASS.dll stdcall delayload';   
 function BASS_StreamCreateFile(mem: BOOL; f: PChar; offset: DWORD; length: DWORD; flags: DWORD): DWORD; 
   external 'BASS_StreamCreateFile@files:BASS.dll stdcall delayload';   
 function BASS_Start(): Boolean; 
   external 'BASS_Start@files:BASS.dll stdcall delayload';   
 function BASS_ChannelPlay(handle: DWORD; restart: BOOL): Boolean; 
   external 'BASS_ChannelPlay@files:BASS.dll stdcall delayload';   
 function BASS_ChannelIsActive(handle: DWORD): Integer; 
   external 'BASS_ChannelIsActive@files:BASS.dll stdcall delayload';   
 function BASS_ChannelPause(handle: DWORD): Boolean; 
   external 'BASS_ChannelPause@files:BASS.dll stdcall delayload';   
 function BASS_Stop(): Boolean; 
   external 'BASS_Stop@files:BASS.dll stdcall delayload';   
 function BASS_Pause(): Boolean; 
   external 'BASS_Pause@files:BASS.dll stdcall delayload';   
 function BASS_Free(): Boolean; 
   external 'BASS_Free@files:BASS.dll stdcall delayload';     
 function GetSystemMetrics(nIndex: Integer): Integer; 
   external 'GetSystemMetrics@user32.dll stdcall';   
 function isxbb_AddImage(Image: PChar; Flags: Cardinal): Integer; 
   external 'isxbb_AddImage@files:isxbb.dll stdcall';   
 function isxbb_Init(hWnd: Integer): Integer; 
   external 'isxbb_Init@files:isxbb.dll stdcall';   
 function isxbb_StartTimer(Seconds: Integer; Flags: Cardinal): Integer; 
   external 'isxbb_StartTimer@files:isxbb.dll stdcall';   
 function isxbb_KillTimer(Flags: Cardinal): Integer; 
   external 'isxbb_KillTimer@files:isxbb.dll stdcall';     
 { * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * } 
 { * * * * * * * * * * * * * * * * * [Кнопка создать новую папку в при выборе директории установки]  * * * * * * * * * * } 
 { * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * } 
 procedure DirOnClick(Sender: TObject); 
 var 
   res: Boolean; 
   UserSelectDir: string; 
 begin 
   UserSelectDir := WizardForm.DirEdit.Text; 
   res := BrowseForFolder('Выберите папку из списка и нажмите «ОК»', UserSelectDir, True); 
   if res then 
   begin 
     WizardForm.DirEdit.Text := UserSelectDir; 
   end; 
 end; 
 { * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * } 
 { * * * * * * * * * * * * * * * * * [Кнопка "создать новую папку" при выборе директории установки]  * * * * * * * * * * } 
 { * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * }     
 procedure PlayButtonOnClick(Sender: TObject); 
 begin 
   case BASS_ChannelIsActive(mp3Handle) of 
     BASS_ACTIVE_PAUSED: 
       begin 
         BASS_ChannelPlay(mp3Handle, False); 
       end; 
     BASS_ACTIVE_STOPPED: 
       begin 
         BASS_Init(-1, 44100, 0, 0, 0); 
         mp3Handle := BASS_StreamCreateFile(FALSE, PChar(mp3Name), 0, 0, BASS_SAMPLE_LOOP); 
         BASS_Start(); 
         BASS_ChannelPlay(mp3Handle, False); 
       end; 
   end; 
 end;     
 procedure PauseButtonOnClick(Sender: TObject); 
 begin 
   BASS_ChannelPause(mp3Handle); 
 end;     
 procedure StopButtonOnClick(Sender: TObject); 
 begin 
   BASS_Stop(); 
   BASS_Free(); 
 end;         
 //при запуске инсталлятора выполняем вот этот код:   
 procedure InitializeWizard(); 
 var 
   Form: TSetupForm; 
   ProgressBar: TNewProgressBar; 
   CancelButton: TButton; 
   StaticText: TNewStaticText; 
   BitmapImage: TBitmapImage; 
   BitmapFileName: string; 
   i: Integer; 
   BackgroundBitmapImage: TBitmapImage; 
   s: string; 
   width, height: Integer; 
   License: string; 
   Readmerus: string; 
   Name1: string; 
   i: Integer; 
   PlayButton, PauseButton, StopButton: TButton; 
   Text: TNewStaticText; 
   Panel1: TPanel; 
 begin 
   WizardForm.DirBrowseButton.OnClick := @DirOnClick; 
   Form := CreateCustomForm(); 
   try 
     with Form do 
     begin 
       ClientWidth := ScaleX(380); 
       ClientHeight := ScaleY(120); 
       BorderStyle := bsDialog; 
       Left := GetSystemMetrics(16) - ClientWidth - ScaleX(12); 
       Top := GetSystemMetrics(17) - ClientHeight - ScaleY(12); 
       Caption := 'Inno Setup Wizard' //Заголовок мини ProgressBar'a 
     end; 
     WizardForm.Position := poScreenCenter; 
     MainForm.BORDERSTYLE := bsNone;   
 {****************************************** [Для корректного отображения "License.rtf"] *********************************} 
     ExtractTemporaryFile('License.rtf'); 
     LoadStringFromFile(ExpandConstant('{tmp}') + '\License.rtf', License) 
       WizardForm.LicenseMemo.RTFText := License; 
 {****************************************** [Для корректного отображения "License.rtf"] *********************************}     
 {****************************************** [Для корректного отображения "Readme_rus.rtf"] ******************************} 
     ExtractTemporaryFile('Readme_rus.rtf'); 
     LoadStringFromFile(ExpandConstant('{tmp}') + '\Readme_rus.rtf', Readmerus) 
       WizardForm.InfoBeforeMemo.RTFText := Readmerus; 
 {****************************************** [Для корректного отображения "Readme_rus.rtf"] ******************************}   
     width := GetSystemMetrics(0); 
     height := GetSystemMetrics(1); 
     MainForm.Width := width; 
     MainForm.Height := height; 
     width := MainForm.ClientWidth; 
     height := MainForm.ClientHeight; 
     ExtractTemporaryFile('Fon.bmp'); 
     s := ExpandConstant('{tmp}') + '\Fon.bmp'; 
     BackgroundBitmapImage := TBitmapImage.Create(MainForm); 
     BackgroundBitmapImage.Bitmap.LoadFromFile(s); 
     BackgroundBitmapImage.Left := 0; 
     BackgroundBitmapImage.Top := 0; 
     BackgroundBitmapImage.Width := width; 
     BackgroundBitmapImage.Height := height; 
     BackgroundBitmapImage.Parent := MainForm; 
     BackgroundBitmapImage.Stretch := True; 
     MainForm.Visible := True;   
     MainForm.Left := 0; 
     MainForm.Top := 0;   
     BitmapFileName := ExpandConstant('{tmp}\xxxx.bmp'); 
     ExtractTemporaryFile(ExtractFileName(BitmapFileName)); 
     BitmapImage := TBitmapImage.Create(Form); 
     BitmapImage.Left := ScaleX(8); 
     BitmapImage.Top := ScaleY(8); 
     BitmapImage.AutoSize := True; 
     BitmapImage.Bitmap.LoadFromFile(BitmapFileName); 
     BitmapImage.Parent := Form;   
     StaticText := TNewStaticText.Create(Form); 
     StaticText.Top := BitmapImage.Top; 
     StaticText.Left := BitmapImage.Left + BitmapImage.Width + ScaleX(8) 
       StaticText.Caption := 'Идет подготовка к запуску мастера Inno Setup Wizard,' + 
       +#10#13 + 'выполняющего установку xxxxx.' + #10#13 + 'Пожалуйста подождите.'; //Текст самого мини ProgressBar'a 
     StaticText.AutoSize := True; 
     StaticText.Parent := Form;   
     CancelButton := TButton.Create(Form); 
     CancelButton.Parent := Form; 
     CancelButton.Width := ScaleX(75); 
     CancelButton.Height := ScaleY(23); 
     CancelButton.Left := Form.ClientWidth - ScaleX(75 + 10); 
     CancelButton.Top := Form.ClientHeight - ScaleY(23 + 10); 
     CancelButton.Caption := 'Отмена'; //Название кнопки "Отмена" 
     CancelButton.ModalResult := mrCancel; 
     CancelButton.Cancel := True; 
     begin 
 //Вставляем наш пароль в поле ввода 
       WizardForm.PasswordEdit.Text := 'пароль:Ю±°єnhfjgn38ynh0946opuh94*^4yt73b64by847__95ng4j3©™€ЇЏ‡€'; 
       begin 
         with WizardForm do begin 
           with MainPanel do 
             Height := Height - 1; 
           with WizardSmallBitmapImage do begin 
             Left := 0; 
             Top := 0; 
             Height := 58; //Размер рисунка 
             Width := 150; // 
           end; 
           with PageNameLabel do begin 
             Width := Width - 0; //Поставьте здесь значения на 0 если хотите вернуть текст 
             Left := Left + 100; // 
           end; 
           with PageDescriptionLabel do begin 
             Width := Width - 0; //Поставьте здесь значения на 0 если хотите вернуть текст 
             Left := Left + 100; // 
             begin 
               Panel1 := TPanel.Create(WizardForm); 
               with Panel1 do 
               begin 
                 Panel1.Parent := WizardForm; 
                 Panel1.Left := ScaleX(1); 
                 Panel1.Top := ScaleY(315); 
                 Panel1.Width := ScaleX(165); 
                 Panel1.Height := ScaleY(46); 
                 Panel1.TabOrder := 0; 
                 Panel1.Color := clWhite; 
                 Panel1.BevelInner := bvLowered; 
                 Panel1.BevelOuter := bvRaised; 
                 Panel1.BorderStyle := bsSingle;   
                 PlayButton := TButton.Create(WizardForm); 
                 PlayButton.Left := 5; 
                 PlayButton.Top := 335; 
                 PlayButton.Width := 50; 
                 PlayButton.Height := 20; 
                 PlayButton.Caption := 'play'; 
                 PlayButton.OnClick := @PlayButtonOnClick; 
                 PlayButton.Parent := WizardForm; 
                 PlayButton.Cursor := crHand;   
                 PauseButton := TButton.Create(WizardForm); 
                 PauseButton.Left := 58; 
                 PauseButton.Top := 335; 
                 PauseButton.Width := 50; 
                 PauseButton.Height := 20; 
                 PauseButton.Caption := 'pause'; 
                 PauseButton.OnClick := @PauseButtonOnClick; 
                 PauseButton.Parent := WizardForm; 
                 PauseButton.Cursor := crHand;   
                 StopButton := TButton.Create(WizardForm); 
                 StopButton.Left := 111; 
                 StopButton.Top := 335; 
                 StopButton.Width := 50; 
                 StopButton.Height := 20; 
                 StopButton.Caption := 'stop'; 
                 StopButton.OnClick := @StopButtonOnClick; 
                 StopButton.Parent := WizardForm; 
                 StopButton.Cursor := crHand;   
                 Text := TNewStaticText.Create(WizardForm); 
                 Text.Caption := 'music'; 
                 Text.Parent := WizardForm; 
                 Text.Font.Style := Text.Font.Style + [fsUnderline]; 
                 Text.Font.Color := clNavy; 
                 Text.Top := 319; 
                 Text.Left := 71; 
                 Text.Color := clWhite; 
               end; 
             end; 
           end; 
         end; 
       end; 
     end;     
 //Мини ProgressBar 
     ProgressBar := TNewProgressBar.Create(Form); 
     with ProgressBar do 
     begin 
       Height := CancelButton.Height - ScaleY(8); 
       Width := Form.Width - ScaleX(128); 
       Top := CancelButton.Top; 
       Left := BitmapImage.Left; 
       Parent := Form; 
       Min := 0; 
       Max := 30; 
       Position := 0; 
     end; 
     Form.ActiveControl := CancelButton; 
     Form.Show(); 
     for i := 0 to 30 do 
     begin 
       Splash.Close; 
       ProgressBar.Position := i; 
       Form.Repaint; 
       Sleep(100); 
       i := i + 1; 
     end; 
   finally 
     Form.Free(); 
   end; 
 end;           
 //Изменяем диалог установки 
 procedure CurPageChanged(CurPageID: Integer); 
 var 
   Name1: string; 
   PlayButton, PauseButton, StopButton: TButton; 
   Text: TNewStaticText; 
   Panel1: TPanel; 
   i: Integer; 
 begin 
 //При установке юзер не поймает пароль по маске 
   if CurPageID = wpPassword then 
   begin 
     SendMessage(WizardForm.NEXTBUTTON.Handle, 513, 0, 0) 
       SendMessage(WizardForm.NEXTBUTTON.Handle, 514, 0, 0) 
   end; 
   begin 
     if CurPageID = wpWelcome then 
     begin 
       if WizardForm.FindComponent('NextButton') is TButton 
         then 
         TButton(WizardForm.FindComponent('NextButton')).Caption := 'Вперед ->'; //текст 
       if WizardForm.FindComponent('CancelButton') is TButton 
         then 
         TButton(WizardForm.FindComponent('CancelButton')).Caption := 'Выход'; //текст 
       if mp3Handle = 0 then 
       begin 
         ExtractTemporaryFile('BASS.dll'); 
         ExtractTemporaryFile('Human1.mp3'); 
         mp3Name := ExpandConstant('{tmp}\Human1.mp3'); 
         BASS_Init(-1, 44100, 0, 0, 0); 
         mp3Handle := BASS_StreamCreateFile(FALSE, PChar(mp3Name), 0, 0, BASS_SAMPLE_LOOP); 
         BASS_Start(); 
         BASS_ChannelPlay(mp3Handle, False); 
       end; 
     end; 
   end; 
   begin 
     if CurPageID = wpReady then 
     begin 
       if WizardForm.FindComponent('CancelButton') is TButton 
         then 
         TButton(WizardForm.FindComponent('CancelButton')).Caption := 'Выход'; //текст 
     end; 
   end; 
   begin 
     if CurPageID = wpInstalling 
       then 
     begin 
       Panel1 := TPanel.Create(WizardForm); 
       with Panel1 do 
       begin 
         Panel1.Parent := WizardForm; 
         Panel1.Left := ScaleX(1); 
         Panel1.Top := ScaleY(60); 
         Panel1.Width := ScaleX(165); 
         Panel1.Height := ScaleY(60); 
         Panel1.TabOrder := 0; 
         Panel1.Color := clWhite; 
         Panel1.BevelInner := bvLowered; 
         Panel1.BevelOuter := bvRaised; 
         Panel1.BorderStyle := bsSingle;   
         PlayButton := TButton.Create(WizardForm); 
         PlayButton.Left := 5; 
         PlayButton.Top := 60; 
         PlayButton.Width := 50; 
         PlayButton.Height := 20; 
         PlayButton.Caption := 'play'; 
         PlayButton.OnClick := @PlayButtonOnClick; 
         PlayButton.Parent := WizardForm; 
         PlayButton.Cursor := crHand;   
         PauseButton := TButton.Create(WizardForm); 
         PauseButton.Left := 58; 
         PauseButton.Top := 60; 
         PauseButton.Width := 50; 
         PauseButton.Height := 20; 
         PauseButton.Caption := 'pause'; 
         PauseButton.OnClick := @PauseButtonOnClick; 
         PauseButton.Parent := WizardForm; 
         PauseButton.Cursor := crHand;   
         StopButton := TButton.Create(WizardForm); 
         StopButton.Left := 111; 
         StopButton.Top := 50; 
         StopButton.Width := 50; 
         StopButton.Height := 20; 
         StopButton.Caption := 'stop'; 
         StopButton.OnClick := @StopButtonOnClick; 
         StopButton.Parent := WizardForm; 
         StopButton.Cursor := crHand;   
         Text := TNewStaticText.Create(WizardForm); 
         Text.Caption := 'music'; 
         Text.Parent := WizardForm; 
         Text.Font.Style := Text.Font.Style + [fsUnderline]; 
         Text.Font.Color := clNavy; 
         Text.Top := 50; 
         Text.Left := 71; 
         Text.Color := clWhite; 
         begin 
           WizardForm.MainPanel.Visible := False; 
           WizardForm.Bevel1.Visible := False; 
           WizardForm.Width := ScaleX(410); 
           WizardForm.Height := ScaleY(142); 
 //Здесь смещение страницы установки (в нижнем левом углу) 
           WizardForm.Left := ScaleX(MainForm.Left + 20); 
           WizardForm.Top := ScaleY(MainForm.Height - 170);   
 {Внимание! Нижеописанные способы смещения работают только когда вставлено фоновое изображение или WindowVisible=yes} 
 {Выводит в правом верхнем углу экрана} 
 //WizardForm.Left:=ScaleX(MainForm.Width-420); 
 //WizardForm.Top:=ScaleY(MainForm.Left+20);   
 {Выводит в левом верхнем углу экрана} 
 //WizardForm.Left := ScaleX(0); 
 //WizardForm.Top := ScaleY(0);   
 {Выводит снизу по центру экрана} 
 //WizardForm.Position:=poScreenCenter; 
 //WizardForm.Top:=ScaleY(MainForm.Height-170);   
 {Выводит в нижнем левом углу (как в Doom 3 Resurrection of Evil от 1C)} 
 //WizardForm.Left:=ScaleX(MainForm.Left+20); 
 //WizardForm.Top:=ScaleY(MainForm.Height-170);   
 {Выводит в нижнем правом углу} 
 //WizardForm.Left:=ScaleX(MainForm.Width-420); 
 //WizardForm.Top:=ScaleY(MainForm.Height-170);   
           WizardForm.InnerNotebook.Left := ScaleX(10); 
           WizardForm.InnerNotebook.Top := ScaleY(10); 
           WizardForm.InnerNotebook.Width := ScaleX(370); 
           WizardForm.StatusLabel.Left := ScaleX(0); 
           WizardForm.StatusLabel.Top := ScaleY(0); 
           WizardForm.StatusLabel.Width := WizardForm.InnerNotebook.Width; 
           WizardForm.FileNameLabel.Left := ScaleX(0); 
           WizardForm.FileNameLabel.Top := ScaleY(20); 
           WizardForm.FileNameLabel.Width := WizardForm.InnerNotebook.Width; 
           WizardForm.ProgressGauge.Top := ScaleY(40); 
           WizardForm.ProgressGauge.Width := WizardForm.InnerNotebook.Width; 
           WizardForm.CancelButton.Left := ScaleX(154); 
           WizardForm.CancelButton.Top := ScaleY(80); 
         end 
         if CurPageID = wpFinished 
           then 
         begin 
           WizardForm.Width := 502; {Размер окна по горизонтали} 
           WizardForm.Height := 392; {Размер окна по вертикали} 
           WizardForm.Position := poScreenCenter; {Возврат в исходное состояние} 
         end 
       end; 
     end; 
   end; 
 end;