📄 八字翼墙.frm
字号:
VERSION 5.00
Begin VB.Form frmbazyq
BorderStyle = 1 'Fixed Single
Caption = "八字翼墙"
ClientHeight = 3915
ClientLeft = 45
ClientTop = 330
ClientWidth = 6345
Icon = "八字翼墙.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3915
ScaleWidth = 6345
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 375
Left = 5280
TabIndex = 9
Top = 3480
Width = 975
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 375
Left = 4200
TabIndex = 8
Top = 3480
Width = 975
End
Begin VB.Frame Frame1
Caption = "原始数据"
Height = 3255
Left = 120
TabIndex = 12
Top = 120
Width = 2895
Begin VB.TextBox Text1
Height = 270
Left = 1800
TabIndex = 0
Text = "Text1"
Top = 360
Width = 975
End
Begin VB.TextBox Text2
Height = 270
Left = 1800
TabIndex = 1
Text = "Text2"
Top = 720
Width = 975
End
Begin VB.TextBox Text3
Height = 270
Left = 1800
TabIndex = 2
Text = "Text3"
Top = 1080
Width = 975
End
Begin VB.TextBox Text4
Height = 270
Left = 1800
TabIndex = 3
Text = "Text4"
Top = 1440
Width = 975
End
Begin VB.TextBox Text5
Height = 270
Left = 1800
TabIndex = 4
Text = "Text5"
Top = 1800
Width = 975
End
Begin VB.TextBox Text6
Height = 270
Left = 1800
TabIndex = 5
Text = "Text6"
Top = 2160
Width = 975
End
Begin VB.TextBox Text7
Height = 270
Left = 1800
TabIndex = 6
Text = "Text7"
Top = 2520
Width = 975
End
Begin VB.TextBox Text8
Height = 270
Left = 1800
TabIndex = 7
Text = "Text8"
Top = 2880
Width = 975
End
Begin VB.Label Label1
Caption = "路基边坡(1:m) m="
Height = 255
Left = 120
TabIndex = 20
Top = 360
Width = 1695
End
Begin VB.Label Label2
Caption = "八字翼墙张角 β="
Height = 255
Left = 120
TabIndex = 19
Top = 720
Width = 1815
End
Begin VB.Label Label3
Caption = "翼墙高度(m) 高H="
Height = 255
Left = 120
TabIndex = 18
Top = 1080
Width = 1695
End
Begin VB.Label Label4
Caption = "翼墙高度(m) 低h="
Height = 255
Left = 120
TabIndex = 17
Top = 1440
Width = 1815
End
Begin VB.Label Label5
Caption = "墙顶宽度(m) a="
Height = 255
Left = 120
TabIndex = 16
Top = 1800
Width = 1935
End
Begin VB.Label Label6
Caption = "翼墙背坡(n:1) n="
Height = 255
Left = 120
TabIndex = 15
Top = 2160
Width = 1815
End
Begin VB.Label Label7
Caption = "基础厚度(m) d="
Height = 255
Left = 120
TabIndex = 14
Top = 2520
Width = 1815
End
Begin VB.Label Label8
Caption = "襟边宽度(m) e="
Height = 255
Left = 120
TabIndex = 13
Top = 2880
Width = 1815
End
End
Begin VB.Frame Frame2
Caption = "计算结果"
Height = 3255
Left = 3120
TabIndex = 10
Top = 120
Width = 3135
Begin VB.ListBox List1
Height = 2940
Left = 120
TabIndex = 11
Top = 240
Width = 2895
End
End
End
Attribute VB_Name = "frmbazyq"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'计算
Dim m As Double, bt As Double, hg As Double, hd As Double
Dim a As Double, n As Double, d As Double, e As Double
Dim m0 As Double, m0z As Double, vs As Double, e1 As Double, dtz As Double, e3z As Double
Dim e2 As Double, vj As Double, ad As Double, c As Double
On Error GoTo handlerror
'八字翼墙
'原始数据
m = Val(Text1.Text)
bt = Val(Text2.Text)
sjwjs = bt
Call dfmhhd
bt = hudu
If Val(Text2.Text) < 0 Then bt = -1 * bt
hg = Val(Text3.Text)
hd = Val(Text4.Text)
a = Val(Text5.Text)
n = Val(Text6.Text)
d = Val(Text7.Text)
e = Val(Text8.Text)
'计算
m0 = m
n0z = (n + Sin(bt) / m) * Cos(bt)
c = a / Cos(hudu)
vs = 0.5 * c * m0 * (hg * hg - hd * hd) + m0 * (hg * hg * hg - hd * hd * hd) / (6 * n0z)
e1 = e / Cos(bt)
dtz = Atn(Tan(bt) - 1 / (m * n0z))
e3z = e * (1 - Sin(bt)) / Cos(bt)
e2 = e / Cos(dtz)
vj = m0 * (c + e1 + e2) * (hg - hd) * d + m0 * (hg * hg - hd * hd) * d / (2 * n0z) + (e1 + e2 + c + hd / n0z) * e * d
ad = c * (hg - hd) * Sqr(1 + m0 * m0)
'输出
List1.Clear
List1.AddItem "《八字翼墙计算》"
List1.AddItem Label1.Caption + " " + Text1.Text
List1.AddItem Label2.Caption + " " + Text2.Text
List1.AddItem Label3.Caption + " " + Text3.Text
List1.AddItem Label4.Caption + " " + Text4.Text
List1.AddItem Label5.Caption + " " + Text5.Text
List1.AddItem Label6.Caption + " " + Text6.Text
List1.AddItem Label7.Caption + " " + Text7.Text
List1.AddItem Label8.Caption + " " + Text8.Text
List1.AddItem "一个墙身体积(m3) =" + Trim(Str(Int(vs * 1000 + 0.5) / 1000))
List1.AddItem "一个基础体积(m3) =" + Trim(Str(Int(vj * 1000 + 0.5) / 1000))
List1.AddItem "一个翼墙顶面积(m2)=" + Trim(Str(Int(ad * 1000 + 0.5) / 1000))
Exit Sub
handlerror:
xiansh = MsgBox("在计算时出错,请检查输入的数据后再试试。", vbInformation, "问题提示")
End Sub
Private Sub Command2_Click()
'关闭
On Error GoTo handlerror
If List1.ListCount > 1 And rjsfzc = 88 Then
frmMain.Text1 = frmMain.Text1 & vbCrLf & ""
For i = 0 To List1.ListCount - 1
frmMain.Text1 = frmMain.Text1 & vbCrLf & " " + List1.List(i)
Next i
frmMain.Text1 = frmMain.Text1 & vbCrLf & " --------------------------------------"
End If
Unload Me
Exit Sub
handlerror:
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
'Esc键退出,VbEscape可以用27代替
On Error GoTo handlerror
If KeyAscii = 27 Then
Unload Me
End If
Exit Sub
handlerror:
End Sub
Private Sub Form_Load()
'启动
On Error GoTo handlerror
'八字翼墙
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
List1.Clear
Exit Sub
handlerror:
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -