Results 1 to 4 of 4

Thread: Button, registry keys and two radio buttons

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    173

    Button, registry keys and two radio buttons

    Hello,

    I have run into a brick wall here with trying to figure this out

    what I have is a button that when clicked on opens up the windows control panel.

    and then options can be set and you then close the control panel.

    then there is two radio buttons one says enabled and one says disabled what they do is check the registry after the button has been clicked on and depending on if the registry is set for 0 or 2 0 for disabled 2 for enabled...

    I've tried various ways but I cannot get the radio buttons to check properly

  2. #2
    Member
    Join Date
    Oct 2009
    Posts
    49

    Re: Button, registry keys and two radio buttons

    Youre just checking a registrys key value? So you want them to automatically check the value after the CP has been closed?
    If value = 0 then the first radio button is "checked"
    if value = 2 then the second radio button is "checked"
    Like that pretty much? I can easily check the registry key value, but when to check it im not sure, possibly starting a timer after you press the button, once the windows CP proccess is gone then check the reg key?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    173

    Re: Button, registry keys and two radio buttons

    a timer might work...Is there anyway to detect the control panel item being closed ?

  4. #4
    Member
    Join Date
    Oct 2009
    Posts
    49

    Re: Button, registry keys and two radio buttons

    Sort of, you can make a timer start after youve pressed the button and each second it checks in the CP process is there. If not check registry key. Its a horrible way of doing it, but the only one i can think if... Scratch that, the CP is opened through explorer.exe. So youd never know.. Im out of options here.. Ill do some research if its possible to figure out how to tell when the CP is closed.

    edit: if you know what the registry keys are when they are disabled and enabled you can do this without ever opening the cp. Just make a simple form with 1 label, 2 radio buttons and a button.
    label = "Would you like to disable or enable <Option Here>?"
    Radio1 = "Enable"
    Radio2 = "Disable"
    Button = "Save Settings"
    When the button is clicked it would change the registry value according to what radio button is ticked. This will only work if you know the registry key values disabled and enabled. Hope this helps
    Last edited by TheDeathly; Nov 27th, 2009 at 12:33 AM.

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