Hello I am making a program in VB that grabs the system information, I want to get the amount of RAM installed, I currently have this code :
However when I run it , I still get a huge number . I know that you should divide by 1024 , but im not sure what is the correct way to use it.Code:Dim CpuName As String Dim sysinfo As String CpuName = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString", Nothing) sysinfo = vbNewLine + "OS Name: " + My.Computer.Info.OSFullName + vbNewLine + "OS Version: " + My.Computer.Info.OSVersion + vbNewLine + "Computer Name: " + My.Computer.Name + vbNewLine + "CPU: " + CpuName + vbNewLine + "RAM: " + ((My.Computer.Info.TotalPhysicalMemory) / 1024 / 1024 / 1024).ToString RichTextBox1.Text = sysinfo




Reply With Quote