Library tutorials & articles

Registry

Introduction

In the days of Windows 3.x, if you wanted to save any application settings, such as the window size, toolbars hidden or shown etc. you would have saved that information to an INI file. However, since 32 bit windows (ie Windows 9x), these settings are stored in one location; the registry.

Comments

  1. 10 Aug 2003 at 21:48

    this will create a key under hkeylocalmachine\software
    named MyFirstKey
    and under that key it will set the default subkey to equal c:\progran files\my
    and create another key called Example with the value of 1


     'Get RegEdit.Server object
     Set S = CreateObject("RegEdit.Server")
     
     'Get a key
     Set Key = S.GetKey("HKLM\SOFTWARE")
     
     'Add a new key
     Set MyKey = Key.CreateKey("MyFirstKey")
     'or Set MyKey = Key.SubKeys.Add("MyFirstKey")
     
     'Set String and DWORD values
     MyKey.Values("") = "C:\Program Files\My"



     S.GetKey("HKLM\SOFTWARE\MYFIRSTKEY").Values("Example")="1"


    Does anyone know how to set a Dword value in the registry??


     Hope this helps

  2. 28 May 2003 at 20:51
    This isn't quite the best place for your question. Anyway, I would do it like this:
    On keydown, set movement to Up.
    On keyup, set movement to None.
    Then when you press the key, the player moves up, and when you release it they stop. The repeat won't have any effect.
  3. 23 Oct 2002 at 11:15

    How do you stope the pause after a keypress? For Example, if you have a game where the arrow key's are used and the player is walking by holding down the arrow key, the player will walk a step, pause then continue walkking.


    You can test this by opening note pad and hit any key and hold down... notice the pause that occurs be for the key is repeated:


    a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
     ^-Simulated pause


    Thanks in advance for any leads!


    -DalePeach

  4. 13 Sep 2002 at 13:27

    You need to use Windows API (see http://www.developerfusion.com/show/1857/)

  5. 13 Sep 2002 at 13:12

    Yes I tried this too, but you can't access anything outside the VB Registry and the User Restry. How do you access things in the Root or under HKEYLOCALMACHINE\SOFTWARE


    ? ? ?



  6. 23 Aug 2002 at 07:03
    Dear Sir

       I used this  fuction it's very good . But can i save my value in some other
       foler other than Vb application Folder...

    Umesh Bardale
    ubardale@yahoo.com
  7. 31 May 2002 at 11:35

    SaveSetting and Gettstting are very fine, but i want to access an registry key not stored with SaveSetting.
    (and not in this VBA ...  folder.


    How can i do this?

  8. 17 Dec 2001 at 20:12
  9. 01 Jan 1999 at 00:00

    This thread is for discussions of Registry.

Leave a comment

Sign in or Join us (it's free).

James Crowley James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audience ...
AddThis

Related discussion

Related podcasts

  • Christian Beauclair

    14 mai 2008 (�mission #0074) ::.Christian Beauclair: Stratégies de migration VB6 vers .NET Nous discutons avec Christian Beauclair des stratégies de migration VB6 vers .NET. Entre autres, nous discutons comment utiliser le "VB 6 Code Advisor" et le "Interop Forms Toolkit" pour ajouter la puiss...

Want to stay in touch with what's going on? Follow us on twitter!