Mega Code Archive

 
Categories / Delphi / API
 

Clearing the recent documents from the start menu

Question: How can I clear the list of recent documents in the Windows Start menu? Answer: Call the Windows API function SHAddToRecentDocs() passing nil as the filename parameter. Example: uses ShlOBJ; procedure TForm1.Button1Click(Sender: TObject); begin SHAddToRecentDocs(SHARD_PATH, nil); end;