Arsip: akses Registry gimana yaa?

 
user image
more 20 years ago

cyberdhoe

boleh nanya ngga ? gw baru belajar delphi niih, tepatnya pake delphi 7. gw bingung gimana sih caranya ngeakses registry ( nge edit, ngehapus, juga nambah key) bantuin gw dong...... gw pernah nyoba nge edit key yang datanya default, tapi hasilnya malah jadi double tuh key nya. gimana yaaaa?
user image
more 20 years ago

delphy

gunakan TRegistry unit yang dipakai: Registry contoh:

function BacaRegistry(KeyName: string): string;
var
  Registry: TRegistry;
begin
  Registry := TRegistry.Create(KEY_READ);
  try
    Registry.RootKey = HKEY_LOCAL_MACHINE;
    Registry.OpenKey(KeyName, False); 
    Result := Registry.ReadString('VALUE1');
  finally
    Registry.Free;
  end;
end;
user image
more 20 years ago

cyberdhoe

kalo itu... buat ngebaca aja yaa.....kalo mo ngedit nilai value yang isinya default gimana ?
user image
more 20 years ago

delphy

ya pake:
Registry.WriteString( 'keyword', 'value' );
ada juga .WriteInteger .WriteFloat dll ini bawaan delphi kok. coba tekan F1
more ...
  • Pages:
  • 1
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Random Topic

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