How to Display OS Version in Visual Basic.Net

Hi! This is me again! :) Now, i will introduce some kind of tutorial that will find and display your PC's OS Version with the use of Visual Basic. Before we start, let us first discuss what are the codes that we will be using in this tutorial. We will use the OperatingSystem class as it will return a string representation of operating system information and the Environment Class which will provide the current environment and platform of your OS. Now, let's start this OS Version Displaying 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 only one Button named Button1 labeled as "Display OS Version". You must design your layout like this: osdesign 3. Add the following code for Button1_Click.
  1.   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         Dim os As OperatingSystem
  3.         os = Environment.OSVersion
  4.         MsgBox("Your OS Version is " & os.VersionString.ToString)
  5.     End Sub
As I said earlier that we will use the OperatingSystem Class that the resources in this class was passed in variable OS. Next, the OS is to be equal to the Environment Class that has the OSVersion resourses. Then we display the OSVersion by putting it on a Message Box. The os.VersionString.ToString displays the version of your OS. The toString() function here converts into a string or a text. Now, let's try to click the Button. It will display your OS Version. os 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