Using Registry keys to add info to textboxes as READ ony

Use this board to post your code snippets - tips and tricks
3 posts Page 1 of 1
Contributors
User avatar
pip
VIP - Donator
VIP - Donator
Posts: 156
Joined: Tue Jul 12, 2011 3:13 am

Don't know what this is useful for but if you go to start search "run" run regedit
then go to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" you find a list of things like owner and what not so anyway if you want people to see their computer info you add 1 label, 1 textbox and 1 button textbox is read only and use this code for each one you want to do repeat it for each textbox so starting from textbox 1 replace "Name of key" with the name of what it says like ProductID or BuildGUID and it reads that value

~Note~
The Name of key is case sensitive!!!!

Hope you enjoy tut and find some use for it!!! cooll;
Code: Select all
Dim readValue As String
        readValue = My.Computer.Registry.GetValue _
        ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "Name of key", Nothing)
        TextBox1.Text = readValue

Image
<a href="http://www.points2shop.com/s/xbox_point ... 5082"><img src="http://points2shop.com/images/promotion ... ricoxg.gif" border="0"/></a>
User avatar
pip
VIP - Donator
VIP - Donator
Posts: 156
Joined: Tue Jul 12, 2011 3:13 am

Why was this moved from tutorials???? I am Saying how to make something because that is all the code you repeat therefore it is tutorial not no dang quicksnip.... fight; fight;
<a href="http://www.points2shop.com/s/xbox_point ... 5082"><img src="http://points2shop.com/images/promotion ... ricoxg.gif" border="0"/></a>
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Is that something to post about? Cant you just PM an admin?
It considered as a quick snip because it is a minor portion of code. This is just showing how to use the registry.
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
3 posts Page 1 of 1
Return to “Quick Snips”