Announcement

Collapse
No announcement yet.

Registry and ComboBox help!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registry and ComboBox help!

    Hello,

    I am having issues with a combobox. Basically, I 'm trying to make a little app that allows me to create/modify registry keys. So far, I have be successful, except when using the combobox and selecting REG_DWORD. When That's selected, it uses the value from item above it. It does not matter if I make it item 1, 2, 3 etc. All other selections work fine. Just the DWORD does not work. If I add item 4 and make it REG_DWORD (now 2 DWORD exit is list) and you select the 4th one, it works fine. I attached my project as explain the issue is not easy.

    In the project if you select "HKEY_CURRENT_USER", "REG_DWORD" for Key= Software\MyTest Name=Testing, Value = 17028 and select "Set Value". Check the registry and you will see the Type is not correct. Select any other type from the project and it will work just fine. DWORD is the only issue. Can someone explain why? Thanks
    Attached Files

  • #2
    The number you are passing as Type does not match its desired value. You use the value returned from ComboBox.GetSelected() and REG_DWORD is the third on your list. However the proper value of REG_DWORD for Registry.SetValue() is 4.

    Ulrich

    Comment


    • #3
      Ulrich,

      I'm a bit confused... Can you show me an example of what I did wrong? I'm not seeing the property value (4). Thanks

      Comment


      • #4
        See here:
        Click image for larger version

Name:	SCRN-2016-10-24-02.png
Views:	44
Size:	22.4 KB
ID:	297279
        Ulrich

        Comment


        • #5
          Thanks Ulrich!

          Comment

          Working...
          X