?? 加寬超高.frm
字號(hào):
VERSION 5.00
Begin VB.Form frmjiakcg
BorderStyle = 3 'Fixed Dialog
Caption = "加寬超高"
ClientHeight = 4770
ClientLeft = 45
ClientTop = 345
ClientWidth = 6315
Icon = "加寬超高.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4770
ScaleWidth = 6315
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame5
Caption = "中樁樁號(hào)"
Height = 615
Left = 2640
TabIndex = 30
Top = 4080
Width = 1695
Begin VB.TextBox Text10
Height = 270
Left = 120
TabIndex = 13
Text = "Text10"
Top = 240
Width = 1455
End
End
Begin VB.Frame Frame4
Caption = "超高方式"
Height = 615
Left = 0
TabIndex = 29
Top = 4100
Width = 2535
Begin VB.OptionButton Option4
Caption = "中軸旋轉(zhuǎn)"
Height = 255
Left = 1200
TabIndex = 12
Top = 240
Width = 1215
End
Begin VB.OptionButton Option3
Caption = "內(nèi)邊軸"
Height = 255
Left = 120
TabIndex = 11
Top = 240
Width = 1095
End
End
Begin VB.Frame Frame3
Caption = "加寬方式"
Height = 615
Left = 0
TabIndex = 28
Top = 3480
Width = 2535
Begin VB.OptionButton Option2
Caption = "高次拋物線(xiàn)"
Height = 255
Left = 1200
TabIndex = 10
Top = 240
Width = 1270
End
Begin VB.OptionButton Option1
Caption = "直線(xiàn)比例"
Height = 255
Left = 120
TabIndex = 9
Top = 240
Width = 1095
End
End
Begin VB.Frame Frame2
Caption = "計(jì)算結(jié)果"
Height = 4040
Left = 2640
TabIndex = 17
Top = 40
Width = 3615
Begin VB.ListBox List1
Height = 3660
Left = 120
TabIndex = 18
Top = 240
Width = 3375
End
End
Begin VB.Frame Frame1
Caption = "原始數(shù)據(jù)"
Height = 3420
Left = 0
TabIndex = 16
Top = 40
Width = 2535
Begin VB.TextBox Text9
Height = 270
Left = 1440
TabIndex = 8
Text = "Text9"
Top = 3100
Width = 975
End
Begin VB.TextBox Text8
Height = 270
Left = 1440
TabIndex = 7
Text = "Text8"
Top = 2740
Width = 975
End
Begin VB.TextBox Text7
Height = 270
Left = 1440
TabIndex = 6
Text = "Text7"
Top = 2380
Width = 975
End
Begin VB.TextBox Text6
Height = 270
Left = 1440
TabIndex = 5
Text = "Text6"
Top = 2020
Width = 975
End
Begin VB.TextBox Text5
Height = 270
Left = 1440
TabIndex = 4
Text = "Text5"
Top = 1660
Width = 975
End
Begin VB.TextBox Text4
Height = 270
Left = 1440
TabIndex = 3
Text = "Text4"
Top = 1300
Width = 975
End
Begin VB.TextBox Text3
Height = 270
Left = 1440
TabIndex = 2
Text = "Text3"
Top = 940
Width = 975
End
Begin VB.TextBox Text2
Height = 270
Left = 1440
TabIndex = 1
Text = "Text2"
Top = 580
Width = 975
End
Begin VB.TextBox Text1
Height = 270
Left = 1440
TabIndex = 0
Text = "Text1"
Top = 220
Width = 975
End
Begin VB.Label Label9
Caption = "路肩橫坡ij% ="
Height = 255
Left = 120
TabIndex = 27
Top = 2400
Width = 1335
End
Begin VB.Label Label8
Caption = "路拱橫坡ic% ="
Height = 255
Left = 120
TabIndex = 26
Top = 2040
Width = 1455
End
Begin VB.Label Label7
Caption = "路肩寬度J(m)="
Height = 255
Left = 120
TabIndex = 25
Top = 3120
Width = 1335
End
Begin VB.Label Label6
Caption = "路面寬度B(m)="
Height = 255
Left = 120
TabIndex = 24
Top = 2760
Width = 1335
End
Begin VB.Label Label5
Caption = "超高緩和段Lc="
Height = 255
Left = 120
TabIndex = 23
Top = 960
Width = 1335
End
Begin VB.Label Label4
Caption = "彎道超高iy% ="
Height = 255
Left = 120
TabIndex = 22
Top = 1680
Width = 1455
End
Begin VB.Label Label3
Caption = "最大加寬 W="
Height = 255
Left = 120
TabIndex = 21
Top = 1320
Width = 1335
End
Begin VB.Label Label2
Caption = "緩直點(diǎn)樁號(hào)HZ="
Height = 255
Left = 120
TabIndex = 20
Top = 600
Width = 1455
End
Begin VB.Label Label1
Caption = "直緩點(diǎn)樁號(hào)ZH="
Height = 255
Left = 120
TabIndex = 19
Top = 240
Width = 1335
End
End
Begin VB.CommandButton Command2
Caption = "關(guān)閉"
Height = 375
Left = 5400
TabIndex = 15
Top = 4320
Width = 855
End
Begin VB.CommandButton Command1
Caption = "計(jì)算"
Height = 375
Left = 4440
TabIndex = 14
Top = 4320
Width = 855
End
End
Attribute VB_Name = "frmjiakcg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'計(jì)算
On Error GoTo handlerror
zh = Val(Text1.Text)
hz = Val(Text2.Text)
lc = Val(Text3.Text)
w = Val(Text4.Text)
iy = Val(Text5.Text)
ic = Val(Text6.Text)
ij = Val(Text7.Text)
b = Val(Text8.Text)
a = Val(Text9.Text)
l = Val(Text10.Text)
iy = iy / 100
ic = ic / 100
ij = ij / 100
If zh <= l And l <= hz Then
x = l - zh
If l > hz - lc Then x = hz - l
'計(jì)算加寬
If Option1.Value = True Then
wx = w
If x < lc Then wx = x / lc * w
Else
wx = w
If x < lc Then
k = x / lc
wx = (4 * k * k * k - 3 * k * k * k * k) * w
End If
End If
'計(jì)算超高
If Option3.Value = True Then
x0 = ic / iy * lc
If x > lc Then
hcw = a * ij + (a + b) * iy
hcz = a * ij + b / 2 * iy
hcl = a * ij - (a + wx) * iy
Else
hcw = a * (ij - ic) + (a * ic + (a + b) * iy) * x / lc
hcz = a * ij + b / 2 * ic
If x > x0 Then hcz = a * ij + b / 2 * x / lc * iy
hcl = a * ij - (a + wx) * ic
If x > x0 Then hcl = a * ij - (a + wx) * x / lc * iy
End If
Else
x0 = 2 * ic / (ic + iy) * lc
If x > lc Then
hcw = a * ij + b / 2 * ic + (a + b / 2) * iy
hcz = a * ij + b / 2 * ic
hcl = a * ij + b / 2 * ic - (a + b / 2 + wx) * iy
Else
hcw = a * (ij - ic) + (a + b / 2) * (ic + iy) * x / lc
hcz = a * ij + b / 2 * ic
hcl = a * ij - (a + wx) * ic
If x > x0 Then hcl = a * ij + b / 2 * ic - (a + b / 2 + wx) * x / lc * iy
End If
End If
End If
List1.AddItem " 中樁樁號(hào) L =" + Str(l)
List1.AddItem " 加寬值 Bj =" + Str(Int(wx * 1000 + 0.5) / 1000)
List1.AddItem " 路基外側(cè)超高值 Hcw=" + Str(Int(hcw * 1000 + 0.5) / 1000)
List1.AddItem " 路中線(xiàn)超高值 Hcz=" + Str(Int(hcz * 1000 + 0.5) / 1000)
List1.AddItem " 路基內(nèi)側(cè)超高值 Hcl=" + Str(Int(hcl * 1000 + 0.5) / 1000)
List1.AddItem ""
Text10.Text = ""
Text10.SetFocus
Exit Sub
handlerror:
xianshi = MsgBox("請(qǐng)檢查輸入的數(shù)據(jù),然后再計(jì)算。", vbInformation, "問(wèn)題提示")
End Sub
Private Sub Command2_Click()
'關(guān)閉
On Error GoTo handlerror
If List1.ListCount > 1 And rjsfzc = 88 Then
frmMain.Text1 = frmMain.Text1 & vbCrLf & ""
frmMain.Text1 = frmMain.Text1 & vbCrLf & " 《加寬超高》:"
frmMain.Text1 = frmMain.Text1 & vbCrLf & ""
For i = 1 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()
'啟動(dòng)
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
List1.Clear
List1.AddItem "單位:長(zhǎng)度為m,其余為%"
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -