
正文
枕善居VB.NET源码 枕善而居造句
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
那位同学帮忙找份学习VB最好的教程网址
VBGOOD CSDN
都很不错的,
VB中国也可以
还有一个叫做 枕善居 的博客里面有超多实例和精品源码,受益颇多
相关问答
Q1: 求VB语言学习网站
下面都是我经常去的地方,把这里利用好了,你的vb水平也会用很大提高的!百度vb贴吧! (初学者可以来这里提问,难点的就去vbgood或者msdn)爱好者乐园 (国内最好的vb学习网站)源码爱好者 (vb的的代码,分类比较全,好代码也不少)枕善居 (VB源代码下载的博客,还不错!)爱电子书吧 (VB的教程,电子书,也很不错)
Q2: 求用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
Q3: 谁有vb.net/c#窗体的非常规按钮控件?比如椭圆?6去7掉5汉6字8就6是0我6扣
百度一下“枕善居”,里面有很多不错的VB.NET源码,其中“多风格渐变按钮 Ver 1.0 For VB.NET 2008”也许能满足你的要求。
关于枕善居VB.NET源码和枕善而居造句的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。







