CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2011
    Posts
    14

    Read/Write/Increment to the Registry

    I am running a VB6 application and need to add the ability to write a value to a registry, increment that value, then read.

    I have don't this before, but I am very rusty.

    I am need to write a demo type setting for my software, basically if you run it 3 times, the 4th you get a message.

    I am pretty sure there are some code samples of how to do this...

    Run program
    If key does not exist in registry add it and set it value to 1
    Run program again
    set key value to 2
    Run program again
    set key value to 3
    Run program again
    Tell user they can no longer run the application.

    If anyone can help me, and even go as far as zipping up a good example, it would be greatly appreciated.

    thanks
    kp

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Read/Write/Increment to the Registry

    look up savesetting and getsetting. These and a few other very simple lines is all you need to do what you ask. Should be a piece of cake if you try.
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured