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 Z10 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 Wert85 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 Wert85 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 F110 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 Z5 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的仪表的信息别忘了在本站进行查找喔 。
推荐阅读
- windows服务器软件,window服务器系统
- 微软word转word,microsoft word文档转换成pdf文件
- php定义常量的数据类型 php中定义常量使用什么方法
- mysql多表匹配查询,mysql多表查询语句
- pdf怎么在电脑上打开是乱码,pdf格式电脑打开是乱码
- 多多直播无人直播的视频,拼多多无人直播赚钱吗
- c语言能读取文件的函数 c语言读取文件屯屯屯
- 查看oracle数据库对象,oracle 查看数据库实例
- 解谜游戏小鱼,小鱼解救小鱼的闯关游戏