I want to make a 'Recent Files'-list in my File-menu, similar to what Microsoft Word and such uses for the last files you opened. I have searched and searched on this site, and I found the code below, but I don't understand how to
implement it in my application.
for i := 0 to FRecentFiles.Count - 1 do
RecentFileItem := TMenuItem.Create(self);
//The Caption is actually cropped to what's after the last / (The filename without path)
RecentFileItem.Caption := ExtractFileName(FRecentFiles[i]);
RecentFileItem.Tag := i;
RecentFileItem.Visible := true;
RecentFileItem.OnClick := OpenRecentFile;
procedure TForm1.OpenRecentFile(Sender: TObject);
Does someone know how?