plz help me..!
Registry value
How I set Registry value in my registry?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tanmay SarkarRank #1,407 · 1.2K reputationPosted Jul 29, 2010, 7:38 PM EDT
Try this code....
using Microsoft.Win32;
private void button1_Click(object sender, EventArgs e)
{
try
{
RegistryKey regkey = Registry.CurrentUser;
regkey = regkey.CreateSubKey (@"Software\Tanmay\Sample"); //path
if (regkey != null)
{
regkey.SetValue("Test", "Hello World"); //Value Name,Value Data
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Mark it as answer if it help you.
Thank you.
Tanmay SarkarRank #1,407 · 1.2K reputationPosted Jul 30, 2010, 8:43 AM EDT
I asked those man who dislike this post please,
If there is better code please put it here we learn from that.
Thank you.
Sam HobbsRank #107 · 20.5K reputationPosted Jul 30, 2010, 6:02 PM EDT
Don't worry about it, though; it happens. There are many unhappy people in the world and it is not your fault that they are unhappy.
If you look at my profile, 11 people voted thumbs up for me and 6 people voted thumbs down. If people voted thumbs down for me due to a misunderstanding, then I wish I could explain. I do sometimes tell people that they should search for answers, and people don't like that. Since I say things like that, I am not surprised that some people vote me down.
I don't see anything you have said that should offend anyone, so don't worry about it.
Tanmay SarkarRank #1,407 · 1.2K reputationPosted Jul 30, 2010, 7:32 PM EDT
But after reading your post, i think world is complex. I visit your profile & few others member who support me in my problem, & i shocked to see some people also dislike them.
But i keep your word. And never mind that thumbs down vote....
But the person if he/she has better code can share with us!
Ok don't worry....
Thank you sir, thank you so much ....
[now you can see 11+me =12 are thumbs up for you] :-)