You can get the size of the (custom) surface of the page using TWizardPage.SurfaceHeight and TWizardPage.SurfaceWidth .
BtnImage.Height := CustomPage.SurfaceHeight; BtnImage.Width := CustomPage.SurfaceWidth;
Although you will see that the (custom) page does not cover the entire area between the "header" ( MainPanel ) and the "footer" (the bottom with buttons).

If you want to display an image over the entire area between the "header" and the "footer", you cannot place it on a (user) page. You should put it on InnerPage (which is the parent control of all the pages with the title).
BtnImage.Parent := WizardForm.InnerPage; BtnImage.Left := 0; BtnImage.Top := WizardForm.Bevel1.Top + 1; BtnImage.Width := WizardForm.InnerPage.ClientWidth; BtnImage.Height := WizardForm.InnerPage.ClientHeight - BtnImage.Top;
But in this way the image will not be automatically displayed / hidden as the user page shows / hides. You must encode it. Use the CurPageChanged event function .
procedure CurPageChanged(CurPageID: Integer); begin WizardForm.InnerNoteBook.Visible := (CurPageID <> CustomPage.ID); BtnImage.Visible := (CurPageID = CustomPage.ID); end;

Related questions:
- Display image even above the title:
How to hide the main panel and show the image on the whole page? - Displaying the image as the background of the entire window: Inno Setup - the image as the background of the installer .
Martin Prikryl Jun 10 '17 at 12:50 2017-06-10 12:50
source share