BLOG ĐANG TRONG THỜI GIAN PHÁT TRIỂN, MONG SỰ QUAN TÂM CỦA MỌI NGƯỜI DÀNH CHO BLOG MỚI NÀY CỦA HUNG.PRO.VN

[VB] Operating System Information

1 min read
The following VB.NET program retrieves the current operating system information like version and platform identifier with the help of OperatingSystem Class and Environment Class.

The OperatingSystem Class provides a method to copy an instance of OperatingSystem, and a method to return a string representation of operating system information.

The OperatingSystem class is not a general purpose class and you cannot derive a more inclusive type from the OperatingSystem class. If you need a type to contain other information about an operating system, create your own type, then include a field of type OperatingSystem and any additional fields, properties, or methods you require.

The Environment Class provides information about, and means to manipulate, the current environment and platform. The Environment Class has a property called OSVersion which returns an object of type OperatingSystem.
 Dim _os As OperatingSystem
  _os = Environment.OSVersion

FULL CODE :
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

		Dim _os As OperatingSystem
		_os = Environment.OSVersion

		MsgBox(_os.VersionString.ToString)

	End Sub

End Class

Bạn có thể thích những bài đăng này

  • Hi mọi người, mình đã quay lai và chia sẽ cho mọi người thủ thuật rút gọn link trực tiếp từ ứng dụng desktop do mình phát triển nhé. Thủ thuật này mình chia sẽ khá lâu rồi rồi, như…
  • Hello các bạn, bài viết này mình muốn chia sẻ một chút với các bạn về cách tạo Splash Screen trong Visual Studio 2010 . Màn hình Splash là chế độ xem sơ bộ khi ứng dụng được khởi đ…
  • Hi mọi người, hôm nay mình chia sẽ lại bài viết dịch google trên ứng dụng và dữ liệu được lấy từ "GOOGLE TRANSLATE". Thủ thuật này hoàn toàn đơn giản chứ không phức tạp nhé mọi n…
  • Hello friends, in this post I will discuss about how to create a simple chat group app that is connected on the same network, using Visual Studio IDE. Such an application is certai…
  •  Hi mọi người, sau một thời gian công việc nên mình đã cho ra mắt phiên bản cho công nhân EVNCPC để giúp người dùng lưu trữ dữ liệu và mỡ những chương trình khác nhanh hơn trê…
  • Hôm nay, mình xin hướng dẫn các bạn, sử dụng thư viện System.speed; có sẵn trong windows, để nhận dạng giọng nói, và thực thi lệnh chúng ta muốn gắn vào. Hiện tại, thì thư viện Sys…

2 nhận xét

  1. second ago
  2. second ago
    lấy thông tin máy tính cần gì phải cần gì phải như vậy, cứ thế này là ok hết


    Label9.Text = My.Computer.Name
    Label10.Text = My.User.Name
    Label11.Text = My.Computer.Info.OSFullName
    Label12.Text = My.Computer.Clock.LocalTime
Hung Pro Blog @ 2025
Chia sẽ kiến thức và tư duy sáng tạo về nhiều ngôn ngữ lập trình khác nhau. Csharp, Visual Studio, Blogger, HTML, Javascript, CSS..v.v
Developed by Jago Desain