20-07-2011, 05:59 PM
لا يوجد خطأ أخي
الدالة
هنا لاستدعاء الدالة
راجع دروس الدورة
بالتوفيق اخي
الدالة
كود :
procedure TForm1.SetWriteString(SelectRootKey: HKEY; SelectKey: string; NewValueName: string; Value: string);
begin
with TRegistry.Create do
begin
try
RootKey := SelectRootKey;
OpenKey(SelectKey, True);
WriteString(NewValueName, Value);
finally
Free;
end;
end;
end;كود :
procedure TForm1.Button1Click(Sender: TObject);
begin
SetWriteString(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion', 'ProductId', Edit1.Text);
end;بالتوفيق اخي

