Drop VirtualExplorerTreeview and VirtualShellMRU in form.
Link MRU to ExplorerTreeview
In code:
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
VirtualShellMRU1.SaveToFile(ExtractFilePath(Application.ExeName) + '\TestMRU.cfg');
end;
procedure TForm1.FormShow(Sender: TObject);
begin
if FileExists(ExtractFilePath(Application.ExeName) + '\TestMRU.cfg') then
begin
VirtualShellMRU1.LoadFromFile(ExtractFilePath(Application.ExeName) + '\TestMRU.cfg');
end;
end;
4. Try running...
5. Note! Example C:\Users\userprofile\Pictures\Camera Roll will be "restored" nicely, but not example: D:\Program Files (x86)\Embarcadero. It will be reverted previous state, not the Emb folder.
6. Try running in host machine it works.
Hi,
procedure TForm1.FormShow(Sender: TObject); begin if FileExists(ExtractFilePath(Application.ExeName) + '\TestMRU.cfg') then begin VirtualShellMRU1.LoadFromFile(ExtractFilePath(Application.ExeName) + '\TestMRU.cfg'); end; end;