C# and Windows Registry Basic Tutorial
I have commented out all steps. I guess you can go through it.
if you got any questions regarding these codes. don't hesitate to PM me.
Dubmood
I have commented out all steps. I guess you can go through it.
if you got any questions regarding these codes. don't hesitate to PM me.
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
namespace WindowsRegistry
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
//Registry.CurrentUser.CreateSubKey(@”EK\Dubmood”);
//Create the Sub Key in the Registry
//Registry.CurrentUser.DeleteSubKeyTree("EK"); //Optional
Registry.CurrentUser.DeleteSubKey(@"EK\Dubmood");
//string reg_currentuser = Registry.CurrentUser.ToString(); //get the path name of the currentuser
//so you don't need to mention that again and again
//Registry.SetValue(reg_currentuser+@"EK\Dubmood","Dubmood",DateTime.Today);
//MessageBox.Show(Convert.ToString(Registry.GetValue(reg_currentuser + @"EK\Dubmood", "Dubmood", "Unable to Find anything"))); //get the value from the Dubmood key
//get all sub keys under the hive
//string[] subkeys = new string[Registry.CurrentUser.GetSubKeyNames().Length];
//subkeys = Registry.CurrentUser.GetSubKeyNames();
//foreach (string subkey in subkeys)
//{
// treeView1.Nodes.Add(subkey);
//}
//get all sub keys under the specific subkey
//string[] regsubkeys = new string[Registry.CurrentUser.OpenSubKey(@"EK\").GetSubKeyNames().Length];
//regsubkeys = Registry.CurrentUser.OpenSubKey(@"EK\").GetSubKeyNames();
//foreach (string subkey in regsubkeys)
//{
//treeView1.Nodes.Add(subkey);
//}
//get all subkeys and their subkeys and list them in the tree view
}
}
}
Dubmood
එලකිරි! පහු ගිය දවස් වල මාත් මේ ගැන හෙව්වා. ඒත් ඕන වැඩේ කරන්න බැරි උනා 
