hallo marabu,
ich weiß nicht warum das bei mir nicht geht ???
Delphi-Quellcode:
procedure ShowHiddenFiles(enabled: Boolean);
const
REG_KEY = '\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced';
begin
with TRegistry.Create do
begin
LazyWrite := false;
if OpenKey(REG_KEY, False) then
begin
WriteInteger('Hidden', 2 - Ord(enabled));
CloseKey;
end;
Free;
end;
SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, Integer(PChar(REG_KEY)));
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
ShowHiddenFiles(true);
end;
mfg vader