Private Sub button2_Click(ByVal sender As Object, ByVal e As EventArgs)
'获取计算机CPU的当前电压
Dim MyInfo As String = "计算机CPU的当前电压是:"
Dim MySearcher As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")
For Each MyObject As ManagementObject In MySearcher.Get()
Try
MyInfo = ControlChars.LfString.Format("CurrentVoltage : "MyObject("CurrentVoltage").ToString())
MyInfo = ControlChars.Lf"========================================================="
Catch
End Try
Next MyObject
MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub button3_Click(ByVal sender As Object, ByVal e As EventArgs)
'获取计算机CPU的外部频率
Dim MyInfo As String = "计算机CPU的外部频率是:"
Dim MySearcher As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")
For Each MyObject As ManagementObject In MySearcher.Get()
Try
MyInfo = ControlChars.LfString.Format("ExtClock : "MyObject("ExtClock").ToString())
MyInfo = ControlChars.Lf"========================================================="
Catch
End Try
Next MyObject
MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub button4_Click(ByVal sender As Object, ByVal e As EventArgs)
'获取计算机CPU的二级缓存
Dim MyInfo As String = "计算机CPU的二级缓存尺寸是:"
Dim MySearcher As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")
For Each MyObject As ManagementObject In MySearcher.Get()
MyInfo = ControlChars.LfString.Format("L2CacheSize: "MyObject("L2CacheSize").ToString())
MyInfo = ControlChars.Lf"========================================================="
Next MyObject
MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub button5_Click(ByVal sender As Object, ByVal e As EventArgs)
'获取计算机CPU的制造商名称
Dim MyInfo As String = "计算机CPU的制造商名称是:"
Dim MySearcher As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")
For Each MyObject As ManagementObject In MySearcher.Get()
MyInfo = ControlChars.LfString.Format("Manufacturer : "MyObject("Manufacturer").ToString())
MyInfo = ControlChars.Lf"========================================================="
Next MyObject
MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub button6_Click(ByVal sender As Object, ByVal e As EventArgs)
'获取计算机CPU的产品名称
Dim MyInfo As String = "计算机CPU的产品名称是:"
Dim MySearcher As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")
For Each MyObject As ManagementObject In MySearcher.Get()
MyInfo = ControlChars.LfString.Format("Name : "MyObject("Name").ToString())
MyInfo = ControlChars.Lf"========================================================="
Next MyObject
MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub button7_Click(ByVal sender As Object, ByVal e As EventArgs)
'获取计算机CPU的版本信息
Dim MyInfo As String = "计算机CPU的版本信息如下:"
Dim MySearcher As New ManagementObjectSearcher("SELECT * FROM Win32_Processor")
For Each MyObject As ManagementObject In MySearcher.Get()
MyInfo = ControlChars.LfString.Format("Version: "MyObject("Version").ToString())
MyInfo = ControlChars.Lf"========================================================="
Next MyObject
MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
Private Sub button8_Click(ByVal sender As Object, ByVal e As EventArgs)
推荐阅读
- css样式表不在下方显示,css样式表不在下方显示出来
- 为什么不能分段拍摄,为什么不能分段拍摄视频
- gis该如何宣传,gis讲座
- 抖音直播内容能下载吗电脑,抖音直播内容能下载吗电脑上
- go语言后台服务程序 go语言开发服务器
- css3教程网,css3基础知识
- sap图表,sap图表栏为什么没有excel图标
- 抖音拍摄与原创有什么区别,抖音原创视频的好处
- 大疆djigo4语言 大疆设置中文