⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 常用公式.frm

📁 饮羽公路测设(glcs) 由20多个公路测量、设计、试验和施工组织设计等小软件组成。如《中桩大地坐标》可以计算不等长缓和曲线的中桩和边桩的大地坐标;《缓和曲线反算》可以根据切线长、外距长或缓和曲线长求
💻 FRM
📖 第 1 页 / 共 3 页
字号:
    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
    
    'sstab1.tab=0 交点坐标
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = ""
    Text6.Text = ""
    Text7.Text = ""
    Text8.Text = ""
    Text9.Text = ""
    Text10.Text = ""
    
    'sstab1.tab=1 度数转换
    Text11.Text = ""
    Text12.Text = ""
    
    'sstab1.tab=1 温度
    Text13.Text = ""
    Text14.Text = ""
    
    'sstab1.tab=2 钢筋
    Label15.Visible = False
    With VSFlexGrid1
        .Clear
        .Editable = flexEDKbdMouse
        .Cols = 5
        .FixedCols = 1
        .FixedRows = 1
        .Rows = 3
        .WordWrap = True
            
        .TextMatrix(0, 0) = "序号"
        .TextMatrix(0, 1) = "钢筋直径(mm)"
        .TextMatrix(0, 2) = "钢筋长度(cm)"
        .TextMatrix(0, 3) = "钢筋根数(根)"
        .TextMatrix(0, 4) = "钢筋重量(kg)"
        
        For i = 0 To .Cols - 1
            .ColAlignment(i) = flexAlignCenterCenter
        Next i
        
        .ColWidth(0) = 500
        .ColWidth(1) = 800
        .ColWidth(2) = 900
        .ColWidth(3) = 900
        .ColWidth(4) = 1000
            
        For i = 1 To .Rows - 1
            .TextMatrix(i, 0) = i
        Next i
            
        .RowHeight(0) = 400
    End With
    
    'SSTab1.TabVisible(3) = False 面积
    '扇形面积
    Text15.Text = ""
    Text16.Text = ""
    Text17.Text = ""
    Text18.Text = ""
    
    '弓形面积
    Text19.Text = ""
    Text20.Text = ""
    Text21.Text = ""
    
    
    
    SSTab1.TabVisible(4) = False
    
    Exit Sub
handlerror:

End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)
'点击页面

    On Error GoTo handlerror
    
    If SSTab1.Tab = 0 Then
        Command1.Visible = True
        Else
            Command1.Visible = False
    End If
    
    
    If SSTab1.Tab = 2 Then
        Label15.Visible = True      '钢筋重量
        Else
            Label15.Visible = False
    End If
    
    Exit Sub
handlerror:

End Sub

Private Sub Text1_Click()
'点击
    
    On Error GoTo handlerror
    
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text11_Click()
'点击
    
    On Error GoTo handlerror
    
    Text11.SelStart = 0
    Text11.SelLength = Len(Text11.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text12_Click()
'点击
    
    On Error GoTo handlerror
    
    Text12.SelStart = 0
    Text12.SelLength = Len(Text12.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text13_Click()
'点击
    
    On Error GoTo handlerror
    
    Text13.SelStart = 0
    Text13.SelLength = Len(Text13.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text14_Click()
'点击
    
    On Error GoTo handlerror
    
    Text14.SelStart = 0
    Text14.SelLength = Len(Text14.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text15_Change()
'数据半径

    On Error GoTo handlerror
    
    Call Subxsmj
    
    Exit Sub
handlerror:

End Sub

Private Sub Text16_Change()
'数据半径

    On Error GoTo handlerror
    
    Call Subxsmj
    
    Exit Sub
handlerror:

End Sub

Private Sub Text17_Change()
'输入角度后计算

    On Error GoTo handlerror
    
    Call Subxsmj
    
    Exit Sub
handlerror:

End Sub

Private Sub Text19_Change()
'弓形输入半径
    
    Dim Rd As Double
    Dim Jd As Double
    Dim Amj As Double

    On Error GoTo handlerror
    
    Rd = Val(Text19.Text)   '圆半径
    Jd = Val(Text20.Text) * pi / 180       '角度
    
    Amj = Rd * Rd * (2 * Jd - Sin(2 * Jd)) / 2
    
    Text21.Text = Trim(Str(Int(Amj * 10000 + 0.50001) / 10000))
    
    Exit Sub
handlerror:

End Sub

Private Sub Text2_Click()
'点击
    
    On Error GoTo handlerror
    
    Text2.SelStart = 0
    Text2.SelLength = Len(Text2.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text20_Change()
'弓形输入角度
    
    Dim Rd As Double
    Dim Jd As Double
    Dim Amj As Double

    On Error GoTo handlerror
    
    Rd = Val(Text19.Text)   '圆半径
    Jd = Val(Text20.Text) * pi / 180       '角度
    
    Amj = Rd * Rd * (2 * Jd - Sin(2 * Jd)) / 2
    
    Text21.Text = Trim(Str(Int(Amj * 10000 + 0.50001) / 10000))
    
    Exit Sub
handlerror:

End Sub

Private Sub Text3_Click()
'点击
    
    On Error GoTo handlerror
    
    Text3.SelStart = 0
    Text3.SelLength = Len(Text3.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text4_Click()
'点击
    
    On Error GoTo handlerror
    
    Text4.SelStart = 0
    Text4.SelLength = Len(Text4.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text5_Click()
'点击
    
    On Error GoTo handlerror
    
    Text5.SelStart = 0
    Text5.SelLength = Len(Text5.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text6_Click()
'点击
    
    On Error GoTo handlerror
    
    Text6.SelStart = 0
    Text6.SelLength = Len(Text6.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text7_Click()
'点击
    
    On Error GoTo handlerror
    
    Text7.SelStart = 0
    Text7.SelLength = Len(Text7.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub Text8_Click()
'点击
    
    On Error GoTo handlerror
    
    Text8.SelStart = 0
    Text8.SelLength = Len(Text8.Text)
    
    Exit Sub
handlerror:

End Sub

Private Sub VSFlexGrid1_AfterEdit(ByVal Row As Long, ByVal Col As Long)
'编辑钢筋表格

    On Error GoTo handlerror
    
    If VSFlexGrid1.TextMatrix(VSFlexGrid1.Rows - 2, 1) <> "" Then
        VSFlexGrid1.Rows = VSFlexGrid1.Rows + 2
    End If
            
    sum = 0
            
    For i = 1 To VSFlexGrid1.Rows - 1
        VSFlexGrid1.TextMatrix(i, 0) = i
                
        d = Val(VSFlexGrid1.TextMatrix(i, 1)) / 1000
        l = Val(VSFlexGrid1.TextMatrix(i, 2)) / 100
        gs = Val(VSFlexGrid1.TextMatrix(i, 3))
        t = d * d * pi / 4 * l * gs * 7850
        VSFlexGrid1.TextMatrix(i, 4) = Int(t * 1000 + 0.5) / 1000
        If t = 0 Then VSFlexGrid1.TextMatrix(i, 4) = ""
        sum = sum + t
    Next i
            
    Label15.Caption = "钢筋重量(kg)=" & Trim(Str(Int(sum * 1000 + 0.50001) / 1000))
    
    If VSFlexGrid1.Col = 1 Then
        VSFlexGrid1.Col = 2
        ElseIf VSFlexGrid1.Col = 2 Then
            VSFlexGrid1.Col = 3
            ElseIf VSFlexGrid1.Col = 3 Then
                VSFlexGrid1.Row = VSFlexGrid1.Row + 1
                VSFlexGrid1.Col = 1
    End If
        
    Exit Sub
handlerror:

End Sub


Public Sub Subxsmj()
'扇形面积计算

    Dim Rd As Double
    Dim Rx As Double
    Dim Jd As Double
    Dim Amj As Double

    On Error GoTo handlerror
    
    Rd = Val(Text15.Text)   '大圆半径
    Rx = Val(Text16.Text)   '小圆半径
    Jd = Val(Text17.Text)   '角度
    
    Amj = (Rd * Rd - Rx * Rx) * pi * Jd / 360
    
    Text18.Text = Trim(Str(Int(Amj * 1000 + 0.5) / 1000))
    
    
    Exit Sub
handlerror:

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -