📄 shu.frm
字号:
VERSION 5.00
Begin VB.Form shu
Caption = "shu"
ClientHeight = 7215
ClientLeft = 60
ClientTop = 435
ClientWidth = 10035
LinkTopic = "Form1"
ScaleHeight = 7215
ScaleWidth = 10035
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command4
Caption = "退出"
Height = 375
Left = 3120
TabIndex = 21
Top = 3120
Width = 735
End
Begin VB.TextBox Text7
Height = 270
Left = 1680
TabIndex = 20
Text = "10"
Top = 3360
Width = 735
End
Begin VB.TextBox Text6
Height = 270
Left = 1680
TabIndex = 18
Text = "418.69"
Top = 2877
Width = 735
End
Begin VB.CommandButton Command3
Caption = "清除"
Height = 375
Left = 3000
TabIndex = 15
Top = 3720
Width = 735
End
Begin VB.CommandButton Command2
Caption = "计算碎部"
Height = 375
Left = 1560
TabIndex = 14
Top = 3720
Width = 1095
End
Begin VB.CommandButton Command1
Cancel = -1 'True
Caption = "计算要素"
Height = 375
Left = 360
TabIndex = 13
Top = 3720
Width = 975
End
Begin VB.TextBox Text5
Height = 270
Left = 2880
TabIndex = 11
Text = "240"
Top = 2403
Width = 495
End
Begin VB.TextBox Text4
Height = 270
Left = 2010
TabIndex = 8
Text = "217"
Top = 2403
Width = 495
End
Begin VB.TextBox Text3
Height = 270
Left = 1680
TabIndex = 6
Text = "-0.006"
Top = 2001
Width = 735
End
Begin VB.TextBox Text2
Height = 270
Left = 1680
TabIndex = 4
Text = "0.004"
Top = 1518
Width = 735
End
Begin VB.TextBox Text1
Height = 270
Left = 1680
TabIndex = 2
Text = "10000"
Top = 1035
Width = 735
End
Begin VB.Label Label11
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "曲线点间距c:"
Height = 180
Left = 360
TabIndex = 19
Top = 3360
Width = 1095
End
Begin VB.Label Label10
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "变坡点高程:"
Height = 180
Left = 360
TabIndex = 17
Top = 2904
Width = 1095
End
Begin VB.Label Label9
Height = 6135
Left = 4320
TabIndex = 16
Top = 960
Width = 4815
End
Begin VB.Label Label8
Height = 2655
Left = 240
TabIndex = 12
Top = 4440
Width = 3495
End
Begin VB.Label Label7
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "+"
Height = 180
Left = 2640
TabIndex = 10
Top = 2448
Width = 105
End
Begin VB.Label Label6
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "DK"
Height = 180
Left = 1680
TabIndex = 9
Top = 2448
Width = 195
End
Begin VB.Label Label5
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "边坡点里程:"
Height = 180
Left = 360
TabIndex = 7
Top = 2448
Width = 1335
End
Begin VB.Label Label4
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "输入坡度α2:"
Height = 180
Left = 360
TabIndex = 5
Top = 1992
Width = 1335
End
Begin VB.Label Label3
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "输入坡度α1:"
Height = 180
Left = 360
TabIndex = 3
Top = 1536
Width = 1335
End
Begin VB.Label Label2
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "输入半径:"
Height = 180
Left = 360
TabIndex = 1
Top = 1080
Width = 1335
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "竖曲线计算"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 3585
TabIndex = 0
Top = 480
Width = 1065
End
End
Attribute VB_Name = "shu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public R As Single
Public a As Single
Public T As Single
Public L As Single
Public E As Single
Public a1 As Single
Public a2 As Single
Public kq As Single
Public kz As Single
Public k0 As Single
Private Sub Command1_Click()
R = Val(Text1.Text)
a1 = Val(Text2.Text)
a2 = Val(Text3.Text)
M0 = Val(Text4.Text)
N0 = Val(Text5.Text)
a = a1 - a2
T = a * R / 2
L = 2 * T
E = T * T / (2 * R)
k0 = M0 * 1000 + N0
kq = k0 - T
kz = kq + L
Label8.Caption = "曲折角a=" & Format(a, "0.000") & vbCrLf & "切线长T=" & Format(T, "0.000") & vbCrLf & "曲线长L=" & Format(L, "0.000") & vbCrLf & "外失距E=" & Format(E, "0.000") & vbCrLf & "起点里程: DK" & Int(kq / 1000) & "+" & Format((kq - Int(kq / 1000) * 1000), "0.000") & vbCrLf & "终点里程: DK" & Int(kz / 1000) & "+" & Format((kz - Int(kz / 1000) * 1000), "0.000")
End Sub
Private Sub Command2_Click()
Dim x As Double
Dim y As Double
Dim H0 As Double
Dim H1 As Double
Dim c As Single
Dim h As Single
c = Text7.Text
h = Text6.Text
For i = kq To k0 Step c
x = i - kq
y = x * x / (2 * R)
H0 = h - (T - x) * a1
H1 = H0 - y
Label9.Caption = Label9.Caption & Format(i, "0.0") & " " & x & " " & Format(y, "0.00") & " " & Format(H0, "0.00") & " " & Format(H1, "0.00") & vbCrLf
Next i
For i = k0 To kz Step c
x = kz - i
y = x * x / (2 * R)
H0 = h + (T - x) * a2
H1 = H0 - y
Label9.Caption = Label9.Caption & Format(i, "0.0") & " " & x & " " & Format(y, "0.00") & " " & Format(H0, "0.00") & " " & Format(H1, "0.00") & vbCrLf
Next i
End Sub
Private Sub Command3_Click()
Text1.Text = 0
Text2.Text = 0
Text3.Text = 0
Text4.Text = 0
Text5.Text = 0
Text6.Text = 0
Text7.Text = 0
End Sub
Private Sub Command4_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -