Public Class Form1 Dim systemonitor As New systemmonitor Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load MsgBox(systemonitor.TotalPmemMB) End Sub End Class
Public Class systemmonitor Public Function TotalPmemMB() As Integer Return Math.Ceiling(My.Computer.Info.TotalPhysicalMemory / 1024 / 1024) End Function End Class