How to Display OS Version in Visual Basic.Net
Submitted by donbermoy on Monday, February 17, 2014 - 16:21.
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:
3. Add the following code for Button1_Click.
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
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim os As OperatingSystem
- os = Environment.OSVersion
- End Sub
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.
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
- 260 views