2017-05-25 114 views
0

我想用WizardForm.Width制作新的安装程序是用户显示器宽度的宽度,WizardForm.Height是用户显示器高度的高度。如何在Inno设置中将WizardForm设置为全屏

所以,我已经写了新的代码,但有一个像黑色区域的错误。

like in this picture below

这是我的代码,我已经编译:

[Code] 
function GetSystemMetrics(nIndex:Integer):Integer; 
external '[email protected] stdcall'; 

procedure InitializeWizard(); 
var 
    width,height: Integer; 
begin 
    MainForm.BorderStyle:= bsNone; 
    width:= GetSystemMetrics(0); 
    height:= GetSystemMetrics(1); 
    MainForm.Width:= width; 
    MainForm.Height:= height; 
    width:= MainForm.ClientWidth; 
    height:= MainForm.ClientHeight; 
    MainForm.Left := 0; 
    MainForm.Top := 0; 

    WizardForm.Position:= poScreenCenter; 
    WizardForm.BorderStyle:= bsNone; 
    WizardForm.Width:= MainForm.Width; 
    WizardForm.Height:= MainForm.Height; 
    WizardForm.ClientWidth:= MainForm.ClientWidth; 
    WizardForm.ClientHeight:= MainForm.ClientHeight; 
    MainForm.Visible:= True; 
end; 
+2

tbqh我会觉得很烦人,有没有理由需要这样做?它非常1990年代 –

+0

当你在整个屏幕上拉伸'WizardForm'时,为什么要显示'MainForm'?无论如何,我同意亚历克斯。 –

回答

0

我不明白为什么你MainForm互动。只需调整WizardForm

[Code] 

function GetSystemMetrics(nIndex: Integer): Integer; 
    external '[email protected] stdcall'; 

procedure InitializeWizard(); 
begin 
    WizardForm.Position := poScreenCenter; 
    WizardForm.BorderStyle := bsNone; 
    WizardForm.Width := GetSystemMetrics(0); 
    WizardForm.Height := GetSystemMetrics(1); 
end; 

虽然向导的设计无论如何都不能在整个屏幕上展开。