15/02/06 17:52
Shutdown
Sai che anche io mi chiamo Niccol? e
sono nato nel 1990?
Dunque passiamo a noi...
--------------------------------
Innanzi tutto, devi includere Registry.
uses
[b]Registry[/b], Windows, etc etc...
--------------------------------
Inserisci nel Form associato a questa
Unit l'oggetto TRegistry,
poi, nella procedura pi?
adatta alle tue necessit?, inserisci questo
codice:
procedure WriteToReg;
var TReg: TRegistry;
begin
TReg:=TRegistry.Create;
TReg.RootKey:=HKEY_LOCAL_MACHINE;
TReg.OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Run',False);
TReg.WriteString('CIAO','Ciao, sono Shutdown');
end;
--------------------------------
per eliminare una voce dal
registro puoi utilizzare quest'altro codice:
procedure DelFromReg;
var TReg:TRegistry;
begin
TReg:=TRegistry.Create;
TReg.RootKey:=HKEY_LOCAL_MACHINE;
TReg.OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Run',False);
TReg.DeleteValue('CIAO');
end;
--------------------------------
Se hai qualche problema posta pure qui!
Ultima modifica effettuata da Shutdown 15/02/06 17:56
aaa