delphi - How can I read values' names and data from the registry? -


I have collected a list of items GridView down as the registry:

  FrmPOSConfigSet .tblCatItems.First; While not frmPOSConfigSet.tblCatItems.Eof be started RegItemSetting.WriteString ( 'STK Group \ Candy', frmPOSConfigSet.tblCatItemsCODE.Text, frmPOSConfigSet.tblCatItemsSPHOTO.Text); FrmPOSConfigSet.tblCatItems.Next; End;  

In the registry editor, I have this:

STK group
- Candy
-> YUPI_GUM_HB, C: \ Users \ tea \ images \ POS item images \ image1.jpg
-> YUPI_GUM_SBKISS, C: to \ Users \ tea \ images \ POS items images \ image2.jpg

I close the form and then open it again, GridView All values ​​have gone in. From the Registry: (\ Users \ Tea Picture \ POS Item Images \ image1.jpg eg.c) and put it in GridView when I load the form how can I get the President (.YUPI_GUM_HB) and its value?

After

this does not look quite like you using TRegistry (also several criteria write string ), but if you were, you can use to get back the registry it. I suspect you're stuck because you want to call but you do not know the names of the registry values, so you do not know whether to pass in ReadString .

You can get a list of the names of all the prices by calling. It has a TStringList (or any other TStrings descendants), and the law will be the list of all the value names.

  var name: teestring; Name, Data: String; I: integer; Start RegItemSetting.OpenKeyReadOnly ('Stuck Group \ Candy'); Name: = TStringList.Create; Try RegItemSetting.GetValueNames (name); For: = 0 Principals (names.Count) start name: = name [i]; Data: = RegItemSetting.ReadString (name); End; Last Name free; End; End;  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -