
正文
vb.net的仪表 vbnet ui
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
VB.NET设计的窗体程序,有什么控件可以实现类似这种下载列表一样的?
如果是.NET平台的,你可以使用ComponentOne Enterprise 全功能.NET控件集中的布局控件实现。也可以试试ComponentOne的LinearGauge 控件,这是一个线性仪表器,显示为一个值和象征参考值的可选范围。线性仪表盘(LinearGauge)控件提供了一个 ShowText 属性,用来决定哪些值以文本显示。
》》传送门:网页链接
相关问答
Q1: vb.net Graphics实现仪表如图? 目前遇到问题是刻度怎么算?
根据三角函数关系vb.net的仪表,用反函数求出 角度值不就行vb.net的仪表了
Q2: VB.NET如何让仪表指针绕某点旋转
你把问题想简单点,直接在PANEL空间上使用GD+画指针就行了。算出两点划线还不容易么?用图片的话需要旋转,而且锯齿非常严重@!
Q3: vb.net 如何安装Tao框架
方法/步骤
首先vb.net的仪表,打开服务器管理器,点击左侧vb.net的仪表的“仪表盘”,如下图所示。
点击上图中vb.net的仪表的“添加角色和功能”,弹出下图所示“添加角色和功能向导”。
一直点击“下一步”,直到“功能”选项卡,点击“.NET Framework 3.5 功能”前面的小三角,展开,勾选“.NET Framework 3.5(包括.NET 2.0和3.0)”前面的复选框,如下图所示,点击下一步。
如下图所示。点击下面的“指定备用源路径”,弹出对话框,如下。
由于小编的系统盘加载在D盘,如下图,所以配置如下路径(一般路径固定,盘符根据自己系统来定),点击“确定”。
点击“安装”,即开始安装.NET Framework 3.5,等安装完成后关闭即可。
Q4: 求用VB 与仪表通讯程序
'人人为我,我为人人
'枕善居汉化收藏整理
'发布日期:2007/09/09
'描 述:仪表盘方式显示CPU和硬盘温度及系统信息
'网 站: (VB6源码博客)
'网 站: (VB.NET源码博客,主要基于.NET2005)
'ADOINFO - a Programm to Monitor the Ressource Usage (C) by TETKOduma
'
'with Car-like Gauges as Displays for:
' CPU MHZ
' CPU Usage as %
'CPU Temperature in Celsius
'HDD Temperature and S.M.A.R.T infos
'Ram USage
'and Battery load state
'This is quite usefull for Notebook users like me
'It's Tipcal for me that i dont like the
'the normal Forms and Designs, so it's Skinned again
'I Use the Smart Information for the Harddisk Temperature
Function GetDriveTemp()
Dim drv_info As DRIVE_INFO
drv_info = GetDriveInfo(0)
With drv_info
If .bDriveType = 0 Then Label2.Caption = "[无可用信息]"
If .bDriveType = 2 Then Label2.Caption = "[ATAPI 驱动器 - 无可用信息]"
If .bDriveType = 1 Then
For i = 0 To UBound(.Attributes)
If Trim$(.Attributes(i).AttrID) = "194" Then GetDriveTemp = (.Attributes(i).Raw(0)): Exit Function
Next i
End If
End With
End Function
'The Information Scrollab at the Bottom, used to Display now the SMART Information
Sub LAufschrift()
Dim drv_info As DRIVE_INFO
drv_info = GetDriveInfo(0)
With drv_info
If .bDriveType = 0 Then Label2.Caption = "[无可用信息]"
If .bDriveType = 2 Then Label2.Caption = "[ATAPI 驱动器 - 无可用信息]"
If .bDriveType = 1 Then
MsgScroller1.AddItem "模式:" vbTab vbTab + Trim$(.Model) + " "
MsgScroller1.AddItem "序号:" vbTab vbTab + Trim$(.SerialNumber) + " "
MsgScroller1.AddItem "固件: " vbTab + Trim$(.FirmWare) + " "
MsgScroller1.AddItem "属性: " + "NAME [Value] [Treshold] [WorstValue] [RAW] "
For i = 0 To UBound(.Attributes)
MsgScroller1.AddItem "[" + Trim$(.Attributes(i).AttrID) + "] " + Trim$(.Attributes(i).AttrName) + " " + CStr(.Attributes(i).AttrValue) + " " + Trim$(.Attributes(i).ThresholdValue) + " " + Trim$(.Attributes(i).WorstValue) + " " + Trim$(.Attributes(i).Raw(0)) + " "
Next i
End If
End With
End Sub
Private Sub Form_Load()
Dim Ret As Long
'Dim Ret As Long
'Set the window style to 'Layered'
Ret = GetWindowLong(Me.hwnd, GWL_EXSTYLE)
Ret = Ret Or WS_EX_LAYERED
SetWindowLong Me.hwnd, GWL_EXSTYLE, Ret
'Set the opacity of the layered window to 200
SetLayeredWindowAttributes Me.hwnd, 0, 240, LWA_ALPHA
'X = Form1.Width / 2: Y = Form1.Height / 2
'Query anlegen und Handle darauf ermitteln
RetVal = PdhOpenQuery(0, 1, hQuery)
If RetVal 0 Then
MsgBox "获取信息失败!", vbExclamation, "提示!"
End
End If
'Performance-Counter definieren
RetVal = PdhVbAddCounter(hQuery, "\Prozessor(0)\Prozessorzeit (%)", hCounter) 'German OS
If RetVal 0 Then
RetVal = PdhVbAddCounter(hQuery, "\Processor(0)\% Processor Time", hCounter) ' English OS
If RetVal 0 Then
MsgBox "获取信息失败!", vbExclamation, "提示!"
PdhCloseQuery hQuery 'Query im Fehlerfall wieder schlie遝n
End
End If
End If
'CPU Infos ermitteln via WMI !Slow!
CPU ' We do this Once at Start
HDAnz = ListDrives 'Die Anzahl der Laufwerke holen
xP = 0
iDir = 4
Unload splash2
Call LAufschrift 'Fill the Bottom Status Bar with Information
End Sub
Private Sub Form_Unload(Cancel As Integer)
PdhCloseQuery hQuery 'Query wieder schlie遝n
End Sub
'CarComputer like Display With Wordwrap Function
'Input: PictureBox, LeftTop Position with X,Y, Wide, height, BackgroundColor, ForegroundColor, Text
Sub CarComp(Pic As PictureBox, x, y, G, G1, fa, fa2, Text)
X1 = 0
y1 = 0
'Drawing the BAckground with Line and BF Option (B for Box, F for FILLED)
If fa fa2 Then
Pic.Line (x, y)-(x + G, y + G1), fa, BF
End If
'Now Setting the Color for the Text and right Textsize
Pic.ForeColor = fa2
Pic.FontSize = 10
' Draw the Text on our little Display
For i = 1 To Len(Text)
s = Mid$(Text, i, 1)
A = Pic.TextWidth(s)
B = Pic.TextHeight(s)
Pic.CurrentX = x + X1
Pic.CurrentY = y + y1
If s = Chr$(12) Then
X1 = 0
y1 = y1 + B
If y1 G1 Then Exit Sub
Else
Pic.Print s
X1 = X1 + A
If X1 = G Then X1 = 0: y1 = y1 + B: If y1 G1 Then Exit Sub
End If
Next i
End Sub
' Super Gauge Car like Speed Display with Leds
Sub SGauge(Pic As PictureBox, x, y, G, fa, Wert, Text)
Dim X1, X2, x3, y1, y2, y3 As Double
PI = 3.1415926543 'Pi
Z = 10
XT = 0 '
G1 = Int(G / 100) 'Our Mesarement ist %, so we build the unit
Gr = G1 * 70 'Z3 is the Radius of the Text, The lines starts from
Z1 = G1 * 110
Z2 = G1 * 130
Z3 = G1 * 90 'Radius Z2 to to radius of Z3
F1 = G1 - 2
If F1 10 Then F1 = 10 'We care about Font Size, should not be smaller then 10
Pic.FontSize = F1 'Setting the Font
Pic.DrawWidth = 1 'Starting with line a normal thick line
Pic.Circle (x, y), Gr, fa, 5.8, 4# 'Drawing in the inner Circle
A1 = (1.78 * PI) - ((((1.78 * PI) - 1) / 100) * Wert) 'Changing the Value in Wert to an angle
r = 0 'Starting Color is Black
For i = 1.78 * PI To 1 Step -0.0455
X1 = x + Int(sIn(i) * Z1)
y1 = y + Int(Cos(i) * Z1) 'Line From Point
X2 = x + Int(sIn(i) * Z2)
y2 = y + Int(Cos(i) * Z2) 'Line to Point
x3 = x + Int(sIn(i) * Z3)
y3 = y + Int(Cos(i) * Z3) 'Postion of Text
If A1 = i Then 'if our Value Angel is smaler or Equal then bright LEDs
If Wert 70 Then fru = H6600 + Wert * 2 Else fru = H33 + Wert * 2
Pic.DrawWidth = 2 'a biger Line is like a LED ;-)
Else
Pic.DrawWidth = 2 'the Small dark line means the LED is off
fru = 0
End If
If Z = 10 Then 'Every Ten line we draw a longer White Line in the Gauge
Pic.DrawWidth = 2
Pic.CurrentX = x3 - 40 - Pic.TextWidth(XT) / 2
Pic.CurrentY = y3 - Pic.TextHeight(XT) / 2 'Calculate the Text Position
Pic.ForeColor = fa
Pic.Print XT
XT = XT + 10 'Dawing Gauge Measerment in steps of 10
Pic.Line (X1, y1)-(X2, y2), fa
'AALine pic.hdc, X1, VarPtr(y1), VarPtr(X2), VarPtr(y2), VarPtr(Fa), 2, 100
Else
Pic.Line (X1, y1)-(X2, y2), (r + fru) '
'AALine pic.hdc, VarPtr(X1), VarPtr(y1), VarPtr(X2), VarPtr(y2), VarPtr(r + fru), 2, 100
End If
Z = Z + 1
If Z 10 Then Z = 1
r = H6000
Next i
Pic.FontSize = 8
Pic.CurrentX = x - (Pic.TextWidth(Text) / 2)
Pic.CurrentY = y + G1 * 80
Pic.Print Text
End Sub
'Draws a horizontal Bar, like a Progressbar
Sub Balken(Pic As PictureBox, x, y, G, D, fa, Wert, Text)
Pic.DrawWidth = 1
xf = Pic.TextWidth(Text) + 40
'Wert = 90
Pic.CurrentX = x
Pic.CurrentY = y - 30
Pic.ForeColor = fa
Pic.Print Text
Pic.Line (x + xf, y)-(x + xf + G, y + D), fa, B
G2 = G - 40
D2 = D - 40
L = Int((G2 / 100) * Wert)
If Wert 85 Then fa2 = H10000 Else fa2 = H1
X2 = x + 20 + xf
x3 = x + xf + L
For i = 1 To D2 / 2 Step 3
y2 = y + i + 20
'F3 = ((90 + I) * fa2 + H444444)
F3 = RGB(50, 160 + i, 50)
Pic.Line (X2, y2)-(x3, y2), F3
Next i
For i = 1 To D2 / 2 Step 3
y2 = y + (D2 / 2 + i) + 20
'F3 = ((90 + (D2 / 2 - I)) * fa2 + H444444)
F3 = RGB(50, 160 - i, 50)
Pic.Line (X2, y2)-(x3, y2), F3
Next i
End Sub
Sub Balken2(Pic As PictureBox, x, y, G, D, fa, Wert, Text)
Pic.FontSize = 8
Pic.DrawWidth = 1
L = Int((G / 100) * Wert)
xf = Pic.TextHeight(Text) + 40
XB = Pic.TextWidth(Text) / 2
Pic.CurrentX = x - XB
Pic.CurrentY = y - xf - 20
Pic.ForeColor = fa
Pic.Print Str$(Wert) + Text
'pic.Line (x, y)-(x + D, y + g + 14), 0, BF
Pic.Line (x, y)-(x + D, y + G + 14), fa, B
G2 = G - 40
D2 = D - 40
L = Int((G2 / 100) * Wert)
L = Int((G2 / 100) * Wert)
If Wert 85 Then fa2 = H10000 Else fa2 = H1
X2 = x + D
y3 = y + G
For i = L To 1 Step -1
F3 = H882222 + (i / 6)
y3 = y + G - i
Pic.Line (x + 10, y3)-(x + D - 10, y3), F3
Next i
For i = L To 100
y3 = y + G - i
Pic.Line (x + 10, y3)-(x + D - 10, y3), o
Next i
End Sub
'Gauge Type 1
Sub DrawGauge1(Pic As PictureBox, x, y, G, fa, Text)
PI = 3.1415926543
Z = 5
XT = 0
G1 = Int(G / 100)
Gr = G1 * 70
Z1 = G1 * 110
Z2 = G1 * 130
Z3 = G1 * 90
F1 = G1 - 2
If F1 10 Then F1 = 10
Pic.FontSize = F1
'Pic.Caption = Str$(g1) + " " + Str$(R)
Pic.Circle (x, y), Gr, fa, 5.8, 4#
For i = 1.78 * PI To 1 Step -0.091
X1 = x + Int(sIn(i) * Z1)
y1 = y + Int(Cos(i) * Z1)
X2 = x + Int(sIn(i) * Z2)
y2 = y + Int(Cos(i) * Z2)
x3 = x + Int(sIn(i) * Z3)
y3 = y + Int(Cos(i) * Z3)
If Z = 5 Then
Pic.DrawWidth = 2
Pic.CurrentX = x3 - 40 - Pic.TextWidth(XT) / 2
Pic.CurrentY = y3 - Pic.TextHeight(XT) / 2
Pic.ForeColor = fa
Pic.Print XT
XT = XT + 10
Else
Pic.DrawWidth = 1
End If
Z = Z + 1
If Z 5 Then Z = 1
Pic.Line (X1, y1)-(X2, y2), fa
Next i
Pic.FontSize = 8
Pic.CurrentX = x - (Pic.TextWidth(Text) / 2)
Pic.CurrentY = y + G1 * 80
Pic.Print Text
End Sub
vb.net的仪表的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于vbnet ui、vb.net的仪表的信息别忘了在本站进行查找喔。







