vb.net获取温度,vb编写温度监测

vb.net 绘制实时温度曲线

这个要用GDI+画。要看你.net版本。

成都创新互联公司主要从事网页设计、PC网站建设(电脑版网站建设)、wap网站建设(手机版网站建设)、响应式网站设计、程序开发、网站优化、微网站、小程序设计等,凭借多年来在互联网的打拼,我们在互联网网站建设行业积累了丰富的成都做网站、网站设计、外贸营销网站建设、网站设计、网络营销经验,集策划、开发、设计、营销、管理等多方位专业化运作于一体。

以下是VS2005中的一段代码。

Me.PictureBox1.Height = 450

Me.PictureBox1.Width = 880

Dim gr As Graphics '定义画布

Dim bp As New Bitmap(880, 450) '定义位图,并进行赋值

Dim p As New Pen(Color.Black) '定义画笔

p.Width = 2 '宽度2

p.DashStyle = Drawing2D.DashStyle.Solid '样式直线

PictureBox1.Image = bp

gr = Graphics.FromImage(PictureBox1.Image)

gr.FillRectangle(Brushes.White, New Rectangle(0, 0, PictureBox1.Width, PictureBox1.Height))

gr.DrawLine(p, a, b, a, .Height - b) '绘制纵坐标

gr.DrawLine(p, a, .Height - b, .Width - a, .Height - b) '绘制横坐标

VB 如何得到CPU温度呢?

Public Function GetCPUTemp() As Double

Dim i As Integer

Dim mCPU As Variant

Dim u As Variant

Dim s As String

Set mCPU = GetObject("WINMGMTS:{impersonationLevel=impersonate}!root\wmi").ExecQuery("SELECT CurrentTemperature From MSAcpi_ThermalZoneTemperature")

For Each u In mCPU

s = s u.CurrentTemperature

Next

Set mCPU = Nothing

GetCPUTemp = (s - 2732) / 10

End Function

Private Sub Form_Load()

Timer1.Interval = 500

End Sub

Private Sub Timer1_Timer()

Print GetCPUTemp()

End Sub

vb.net访问access数据库,怎么使用SQL查询语句,按照指定的时间间隔提取数据。

按照5分钟的时间间隔从中提取数据。对时间的分钟数,取5的模,为0的即取出来即可

select 时间,温度 from 记录温度 where ((时间 mod 5) =0)

vb2013 如何获得显卡GPU温度

利用 WMI。

.NET 中有个命名空间是 System.Management.ManagementObjectSearcher,可以进行相关硬件设备信息的读取。

代码参考:

Dim CPUtprt As Double = 0

Dim mos As System.Management.ManagementObjectSearcher = New System.Management.ManagementObjectSearcher("root\WMI", "Select * From MSAcpi_ThermalZoneTemperature")

For Each mo As System.Management.ManagementObject in mos.Get

CPUtprt = Convert.ToDouble(Convert.ToDouble(mo.GetPropertyValue("CurrentTemperature").ToString()) - 2732) / 10

Console.Write("CPU 温度 : "  CPUtprt.ToString  " °C")

Next

注:以上代码为我对照 C# 转换过来的,未经过 IDE 环境下测试。

如何用VB.Net进行CPU温度读取

没有命令可以查看CPU温度,可以通过第三方软件鲁大师查看CPU温度:

百度搜索鲁大师,并进行下载安装;

运行已安装的软件的,在界面中就能看到CPU温度:

vb.net的serialport控件实时采集16进制单片机温度值,新手实在没看懂,大家进来帮我看一下,谢谢啦

1 那里只是重新给String赋值。

2 空字符不存在要消除。

3 datastr是数组!

4 这和采集的数据有关,重点是 dec = val(hexString)

网站名称:vb.net获取温度,vb编写温度监测
链接地址:https://www.cdcxhl.com/article38/dsceppp.html

成都网站建设公司_创新互联,为您提供App设计网站导航网站排名手机网站建设动态网站建站公司

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都做网站