Development How do I make app run different tasks depending on reg value?(C# .net 4.0)

Discussion in 'Software' started by NikoBellic, 15 Mar 2011.

  1. NikoBellic

    NikoBellic Tech Addict

    Joined:
    9 May 2009
    Posts:
    96
    Likes Received:
    1
    Hi,

    So I'm struggling to find anything about running different tasks inside my application depending on the registry value.

    Here is an example of what I'm trying to do:

    Code:
    //if the following value is
    
    HKLM\SOFTWARE\Application1\String\0
    
    //then run
    
                            {
                                button1.Visible = true;
                                button2.Visible = false;
                            }
    
    
    //if the value is 
    
    HKLM\SOFTWARE\Application1\String\1
    
    //then run
    
                            {
                                button1.Visible = false;
                                button2.Visible = true;
                            }
    
    //if the value is 
    
    HKLM\SOFTWARE\Application1\String\2
    
    //then run
    
                            {
                                button1.Visible = false;
                                button2.Visible = false;
                            }
    
    //if there is no value available then run 
    
    
                            {
                                button1.Visible = true;
                                button2.Visible = true;
                            }
    
    
    
    If anyone could help it would be greatly appreciated.

    Thanx In Advanced :)
     
  2. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,953
    Likes Received:
    270
  3. Daedelus

    Daedelus What's a Dremel?

    Joined:
    7 May 2009
    Posts:
    253
    Likes Received:
    12

Share This Page