المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Renaming value data



C# Programming
05-28-2009, 11:12 AM
Hi dear friends,

Please check out this code for editing the registry, I have tried this and it works fine:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Microsoft.Win32;

namespace Editing_the_Registry
{
class Program
{
static void Main(string[] args)
{
Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Rajdeep");
key.SetValue("MyString", "CreatedbyRajdeep");
key.Close();
}
}
}


This piece of code just creates a Subkey called 'Rajdeep' in the HKEY_Current_User Key, and then creates a String value called 'MyString' within the SubKey 'Rajdeep' and sets the value data as 'CreatedbyRajdeep'.

But my issue is different. I want to change the value data of 'HKEY_CURRENT_USER\Control Panel\Desktop\MenuShowDelay\' to '200' from default '400'. It will speed up the Menu display from 400 milliseconds to 200 milliseconds, thus making the PC faster.

Your help will be truly appreciated,
Rajhttp://www.barakasoft.com/script/Forums/Images/thumbs_up.gifhttp://www.barakasoft.com/script/Forums/Images/smiley_cool.gif

PS: I am using Virtual PC, since MSDN suggests so.