problema com regedit (dados)
Como faço para saber se uma determinado valor de sequência está vazio...
Fiz vários testes, sempre entra na condição que existe valores.
testei com valuesExist KeyExist e outros.
Fiz vários testes, sempre entra na condição que existe valores.
var login : String; begin reg := TRegistry.Create; with reg do begin RootKey := hkey_current_user; reg.OpenKey (´software\sp´, false); if reg.KeyExists(´teste´) then showmessage(´tem´); end;
testei com valuesExist KeyExist e outros.
Unix
Curtidas 0
Respostas
Vitor Alcantara
21/11/2007
var login : String; begin reg := TRegistry.Create; with reg do begin RootKey := hkey_current_user; reg.OpenKey (´software\sp´, false); if reg.KeyExists(´teste´) then begin if reg.ReadString(´teste´) = ´´ then ShowMessage(´String vazia´) else ShowMessage(´Valor existe: ´+ Reg.ReadString(´Teste´); end else ShowMessage(´Valor não existe´); end;
GOSTEI 0
Unix
21/11/2007
Valeu Vitor, funcionou.
GOSTEI 0