Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Pure VPN - Up to 27 Months
vgp
Updated:
Today at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Tips & Tricks
C# and Windows Registry Basic Tutorial
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Dubmood" data-source="post: 10210525" data-attributes="member: 357268"><p><span style="font-family: 'Georgia'"><span style="font-size: 15px"><strong>C# and Windows Registry Basic Tutorial</strong></span></span></p><p><span style="font-family: 'Georgia'"><span style="font-size: 15px"><strong></strong></span></span></p><p><span style="font-family: 'Georgia'"><span style="font-size: 15px"></span></span></p><p><span style="font-family: 'Georgia'"><span style="font-size: 15px">I have commented out all steps. I guess you can go through it.</span></span></p><p><span style="font-family: 'Georgia'"><span style="font-size: 15px">if you got any questions regarding these codes. don't hesitate to PM me.</span></span></p><p></p><p>[CODE]using System;</p><p>using System.Collections.Generic;</p><p>using System.ComponentModel;</p><p>using System.Data;</p><p>using System.Drawing;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Windows.Forms;</p><p>using Microsoft.Win32;</p><p></p><p>namespace WindowsRegistry</p><p>{</p><p> public partial class Form1 : Form</p><p> {</p><p> public Form1()</p><p> {</p><p> InitializeComponent();</p><p> }</p><p></p><p> private void button1_Click(object sender, EventArgs e)</p><p> {</p><p> //Registry.CurrentUser.CreateSubKey(@”EK\Dubmood”);</p><p> //Create the Sub Key in the Registry</p><p> //Registry.CurrentUser.DeleteSubKeyTree("EK"); //Optional</p><p> Registry.CurrentUser.DeleteSubKey(@"EK\Dubmood");</p><p></p><p> //string reg_currentuser = Registry.CurrentUser.ToString(); //get the path name of the currentuser</p><p> //so you don't need to mention that again and again</p><p> //Registry.SetValue(reg_currentuser+@"EK\Dubmood","Dubmood",DateTime.Today);</p><p> //MessageBox.Show(Convert.ToString(Registry.GetValue(reg_currentuser + @"EK\Dubmood", "Dubmood", "Unable to Find anything"))); //get the value from the Dubmood key</p><p></p><p> //get all sub keys under the hive</p><p> //string[] subkeys = new string[Registry.CurrentUser.GetSubKeyNames().Length];</p><p> //subkeys = Registry.CurrentUser.GetSubKeyNames();</p><p></p><p> //foreach (string subkey in subkeys)</p><p> //{</p><p> // treeView1.Nodes.Add(subkey);</p><p> //}</p><p> </p><p> //get all sub keys under the specific subkey</p><p> //string[] regsubkeys = new string[Registry.CurrentUser.OpenSubKey(@"EK\").GetSubKeyNames().Length];</p><p> //regsubkeys = Registry.CurrentUser.OpenSubKey(@"EK\").GetSubKeyNames();</p><p></p><p> //foreach (string subkey in regsubkeys)</p><p> //{</p><p> //treeView1.Nodes.Add(subkey);</p><p> //}</p><p></p><p> //get all subkeys and their subkeys and list them in the tree view</p><p> }</p><p> }</p><p>}</p><p></p><p></p><p>[/CODE]</p><p><strong></strong></p><p><strong>Dubmood</strong></p></blockquote><p></p>
[QUOTE="Dubmood, post: 10210525, member: 357268"] [FONT=Georgia][SIZE=4][B]C# and Windows Registry Basic Tutorial [/B] 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.[/SIZE][/FONT] [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 } } } [/CODE] [B] Dubmood[/B] [/QUOTE]
Insert quotes…
Verification
Winadiyakata thappara keeyak tibeda?
Post reply
Top
Bottom