UPDATED: Finding CPU Name & Speed in VB 2005/2008/2010 via Registry

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
253 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon
Ratings have been disabled for this video.

Uploaded by on Dec 11, 2011

Hello -

The audio might be choppy and the video might fall behind, but if you cannot understand the video due to such technical difficulties, just follow the instructions below:

1) Open up VB 2005, 2008, or 2010 - whichever version you have installed.
2) Create a New Project. Make sure it is a Windows Application. Name it whatever you like and press Continue.
3) Resize, configure, and/or adjust your Form1 if necessary.
4) Either add four labels or textboxes (up to you) to the form window. Label two of them anything you want and can identify from each other.
5) Create a Button (no longer Form_Load from last tutorial) and name it whatever.
6) Double click on the button to open the coding window.
7) To make things lot more organized and simple, use "Dim . . . As String" values:

Dim Name As String
* [Name] is a placeholder. Name this whatever you want!
Name = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\SYSTEM\Ce­ntralProcessor\0", "ProcessorNameString", Nothing)
Label1.Text = Name
* [Label1] is whatever you are using - label or textbox.
Dim Speed As String
* Use any name for [Speed}.
Speed = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\SYSTEM\Ce­ntralProcessor\0", "~MHz", Nothing) & " MHz"
Label2.Text = Speed
* Label2 could be textbox or another label name. This is dwfault.
*** Optionally, if you want the title to display the name or speed, just add this after the last Dim:
Me.Text = Name & " - [Whatever you want this to be called}"

8) Press F5 to bug your application and test it.
9) If you are satisfied, save your project in your specified directory.
10) You can finalize your project by editing its assembly information then build it by going to the Build file menu. Your executable will be built in the directory where your project is saved.

In a nut shell, this is accessing registry to retrieve these information. If you cannot display these info in your program, it is likely that you do not have full permission to access the registry, or there could be a typography error in your code.

If you need more help, please comment below. If you love my videos and want more of this type, subscribe and wait...

Take care!

Link to this comment:

Share to:

Uploader Comments (1AppleMaker)

  • C-C-CP u Nnname

  • @MaddZ3r0 Your point?

see all

All Comments (3)

Sign In or Sign Up now to post a comment!
  • @1AppleMaker the video when ya talk it laggs and it lagged so it sayd that

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more