Arsip: Ganti Ikon Drive di MyComputer (WinXP)


by LuriDarmawan in Articles more 18 years ago 1534
Cara ini tidak berlaku untuk Windows98, dan untuk memodifikasinya juga bukan merupakan hal yang mudah.
Tambahkan Registry di klausa USES
procedure TForm1.Button1Click(Sender: TObject);
var Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
with Reg do
begin
RootKey := HKEY_LOCAL_MACHINE;
OpenKey
('Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\DriveIcons\', True);
{ True, because if a subkey named DriveIcons and/or DefaultIcon
does not exist, windows automatically creates it }
OpenKey('C\\DefaultIcon\', True); // as default first drive C
// we are choosing empty field as default value
WriteString('', 'C:\\YourIcons\\Sample1.ico');
{ and icon file path  or if dll file then
e.g  'c:\\YourIcons\\Icons.dll, 2' }
CloseKey;
end;
finally
Reg.Free;
end;
// if 2nd hard drive is present..
Reg := TRegistry.Create;
try
with Reg do
begin
RootKey := HKEY_LOCAL_MACHINE;
OpenKey
('Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\DriveIcons\', True);
OpenKey('D\\DefaultIcon\', True);
WriteString('', 'C:\\YourIcons\\Sample2.ico');
CloseKey;
end;
finally
Reg.Free;
end;
end;
Dengan cara yang sama, kamu bisa memodifkasinya untuk drive yang lain. ref: http://www.delphi3000.com/articles/article_4457.asp?SK=

Coinfest

Pascal Indonesia is Coinfest Asia 2024's official community partner! 🀝
β˜€οΈ Take part in Asia’s immersive Web3 festival, where innovation meets adoption.
🎟 Get your tickets at www.coinfest.asia and use our special promo code : CA24PASCALINDO to get 10% off!

Why Coinfest Asia?
● Unconventionally Engaging
Our immersive setting and programming leave you with more memory markers than any other event
● Dive into Emerging Markets
Get connected in Southeast Asia; the fastest-growing Web3 region in the world
● Jump straight into Adoption
Foster collaborations directly in Indonesia where there are 437k new crypto users each month

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com