2017-05-25 63 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; 

雖然嚮導的設計無論如何都不能在整個屏幕上展開。