📄 介电参数计算.frm
字号:
VERSION 5.00
Begin VB.Form 介电参数计算
Caption = "根据平板电容原理计算介电参数C=E*S/d S=L*W "
ClientHeight = 2565
ClientLeft = 60
ClientTop = 450
ClientWidth = 7005
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 2565
ScaleWidth = 7005
Begin VB.CommandButton Command2
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5400
TabIndex = 11
Top = 1440
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "计算"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 4080
TabIndex = 10
Top = 1440
Width = 1335
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 5400
TabIndex = 9
Text = "Text5"
Top = 120
Width = 1095
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 7
Text = "210"
Top = 1680
Width = 975
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 4
Text = "6.5"
Top = 1080
Width = 975
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 3
Text = "10"
Top = 600
Width = 975
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 1
Text = "30"
Top = 120
Width = 975
End
Begin VB.Label Label5
Caption = "计算介电参数 E"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 3480
TabIndex = 8
Top = 240
Width = 1815
End
Begin VB.Label Label4
Caption = "测试电容值C(pF)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 6
Top = 1800
Width = 2175
End
Begin VB.Label Label3
Caption = "极板距离d(mm)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 5
Top = 1200
Width = 1935
End
Begin VB.Label Label2
Caption = "极板宽度W(mm)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 2
Top = 720
Width = 1935
End
Begin VB.Label Label1
Caption = "极板长度L(mm)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 0
Top = 240
Width = 1935
End
End
Attribute VB_Name = "介电参数计算"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'空气的绝对介电系数=8.85 * E-12 空气相对介电系数=1
Private Sub Command1_Click()
Dim L As Double
Dim W As Double
Dim H As Double
Dim C As Double
Dim Er As Double
Dim E0 As Double
L = Val(Text1.Text) / 1000
W = Val(Text2.Text) / 1000
H = Val(Text3.Text) / 1000
C = Val(Text4.Text)
E0 = 8.85
If L <= 0 Or W <= 0 Or H <= 0 Or C <= 0 Then
MsgBox ("输入参数不能为0或负数!!")
Exit Sub
End If
Er = C * H / (L * W) / E0 'C=E X L X W/H
Text5.Text = Int(Er * 1000) / 1000
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Height = 3000
Me.Width = 7000
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -