Displaying Computer Information using VB.NET

This is my another tutorial in vb.net entitled Displaying your Computer Information. We will just use My Namespace in which it exposes frequently used information about your application, your computer, and more. So, now let's start this tutorial! 1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application. 2. Next, add Five Texboxes namely TextBox1 for our Computer Name, TextBox2 for the User Name, TextBox3 for knowing the Keyboard Capslock, TextBox4 for the width and height of your computer screen., and TextBox5 for knowing that your Mouse Wheel exists. Add also one Button named Button1 and labeled it as "Display". You must design your layout like this: design 3. Next put this code in Button1_Click. This is to display the information on your Computer.
  1.  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         TextBox1.Text = My.Computer.Name
  3.         TextBox2.Text = My.User.Name
  4.         TextBox3.Text = My.Computer.Keyboard.CapsLock
  5.         TextBox4.Text = My.Computer.Screen.WorkingArea.ToString()
  6.         TextBox5.Text = My.Computer.Mouse.WheelExists
  7.     End Sub

Explanation

As I said earlier, we will use the My namespace to get the information on our computer. My.Computer.Name - the Computer.Name here finds your Computer Name Resources. My.User.Name - the Computer.Name here finds your User Name resources that logged-in in the computer. My.Computer.Keyboard.CapsLock - the Computer.Keyboard.CapsLock finds a boolean answer if your Keyboard Capslock is On or Off. My.Computer.Screen.WorkingArea.ToString() - the Computer.Screen.WorkingArea finds the specific width and height of your computer and we use ToString() function to convert the output to string. My.Computer.Mouse.WheelExists - the Computer.Mouse.WheelExists finds the boolean answer if you use your Mouse Wheel or not. Now, click your Button and it will display your Computer Information like this: output Download the source code below and try it! :) For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below. Best Regards,

Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]

Visit and like my page on Facebook at: Bermz ISware Solutions

Subscribe at my YouTube Channel at: SerBermz

Add new comment