how to read/write System Registry keys

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kalichakradhar
    New Member
    • Mar 2007
    • 8

    how to read/write System Registry keys

    hi,

    I am new to VB.. I am dedveloping a tool in which there would be a browser/text box to open the desired file.. the problem here is that i want to remember the old file that i opened last time when i run the exe.. i came to know that this can be done by adding the file name as keys in the system registry. I wanted to know how can i edit/read/write into system registry using VB 6.0. I want to create a registry entry and add keys with the file names. please tell me the syntax and the necessary components to be added to get the desired result

    thanks
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by kalichakradhar
    hi,

    I am new to VB.. I am dedveloping a tool in which there would be a browser/text box to open the desired file.. the problem here is that i want to remember the old file that i opened last time when i run the exe.. i came to know that this can be done by adding the file name as keys in the system registry. I wanted to know how can i edit/read/write into system registry using VB 6.0. I want to create a registry entry and add keys with the file names. please tell me the syntax and the necessary components to be added to get the desired result

    thanks
    you can use below methot to get registory key value

    [CODE=vb]GetSetting[/CODE]

    below is to save Reg key

    [CODE=vb]SaveSetting[/CODE]

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      use the following API's:

      GetSetting and SaveSetting

      REgards
      Veena

      Comment

      • sgrec7
        New Member
        • Aug 2007
        • 58

        #4
        Originally posted by kalichakradhar
        hi,
        how to read/write System Registry keys
        guess what, NO ONE should play with regedit, that is just as bad as 'cleaning out the windows folder'

        u want my advice ??? DONT touch the registry

        Comment

        • hariharanmca
          Top Contributor
          • Dec 2006
          • 1977

          #5
          Originally posted by sgrec7
          guess what, NO ONE should play with regedit, that is just as bad as 'cleaning out the windows folder'

          u want my advice ??? DONT touch the registry
          Yes that may happen. But that is Necessary for any application for there initial values

          But make sure you have to play within the registry key created by you.

          Comment

          Working...