Delphi 有記住打開過的專案的功能,在下一次開啟IDE時會顯示在Welcome Page中,那要如何清除呢?
1.File→Reopen→Properties
可以設定~
.Number of Projects →記住幾個開過的專案(預設10個)
.Number of files→記住幾個開過的檔案(預設15個)
.Reopen Items就是顯示在Welcome Page的內容,可以點選後用Delete或直接Clear
2.進入登錄編輯程式刪除
HKEY_CURRENT_USER\Software\Embarcadero\BDS\10.0\Closed Projects
3.寫程式刪除
uses 加入 System.Win.Registry;
[delphi]
procedure TForm1.Button1Click(Sender: TObject);
var
iCount : Integer;
Reg : TRegistry;
sList : TStrings;
begin
sList := TStringList.Create;
Reg := TRegistry.Create;
try
Reg.RootKey := HKEY_CURRENT_USER;
if Reg.OpenKey(‘\Software\Embarcadero\BDS\10.0\Closed Projects’, True) then
Reg.GetValueNames(sList);
if sList.Count > 0 then begin
for iCount := 0 to Pred(sList.Count) do
Reg.DeleteValue(sList[icount]);
end else
MessageDlg(‘No registry items to be cleaned at this time.’,
mtInformation, [mbOk], 0);
finally
sList.Free;
Reg.Free;
end;
end;
[/delphi]