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

📄 贝克曼梁测弯沉.frm

📁 饮羽公路测设(glcs) 由20多个公路测量、设计、试验和施工组织设计等小软件组成。如《中桩大地坐标》可以计算不等长缓和曲线的中桩和边桩的大地坐标;《缓和曲线反算》可以根据切线长、外距长或缓和曲线长求
💻 FRM
📖 第 1 页 / 共 2 页
字号:
    
    Exit Sub
handlerror:
    xiansh = MsgBox("在选择公路等级时出错,请再试试。", vbInformation, "问题提示")

End Sub

Private Sub Command1_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 Command2_Click()
'计算
    
    On Error GoTo handlerror
    
    If Combo1.Text = "" Then
        xiansh = MsgBox("请选择公路等级后再计算。", vbExclamation, "问题提示")
        Exit Sub
    End If
    If Val(Text5.Text) = 0 Or Val(Text6.Text) = 0 Then
        xiansh = MsgBox("温度或季节影响系数不能为零。", vbExclamation, "问题提示")
        Exit Sub
    End If
    
    k1 = Val(Text5.Text)
    k2 = Val(Text6.Text)
    
    List1.Clear
    List1.AddItem "《贝克曼梁测弯沉计算结果》"
    List1.AddItem ""
    List1.AddItem "----原始数据----"
    List1.AddItem "25以下温度T25    =" + Text1.Text
    List1.AddItem "沥青中间温度Tm   =" + Text2.Text
    List1.AddItem "沥青底面温度Te   =" + Text3.Text
    List1.AddItem "平均温度T        =" + Text4.Text
    List1.AddItem "温度系数K1       =" + Text5.Text
    List1.AddItem "季节影响系数K2   =" + Text6.Text
    List1.AddItem "公路等级         =" + Combo1.Text
    List1.AddItem ""
    
    For i = 0 To VSFlexGrid1.Rows - 2
        If i = 0 Then List1.AddItem VSFlexGrid1.TextMatrix(i, 0) + "    " + VSFlexGrid1.TextMatrix(i, 1) + "    " + VSFlexGrid1.TextMatrix(i, 2) + "    " + VSFlexGrid1.TextMatrix(i, 3) + "    " + VSFlexGrid1.TextMatrix(i, 4) + "    " + VSFlexGrid1.TextMatrix(i, 5)
        
        If Len(VSFlexGrid1.TextMatrix(i, 0)) = 1 Then kg1 = "            "
        If Len(VSFlexGrid1.TextMatrix(i, 0)) = 2 Then kg1 = "           "
        If Len(VSFlexGrid1.TextMatrix(i, 0)) = 3 Then kg1 = "          "
        
        If Len(VSFlexGrid1.TextMatrix(i, 1)) = 0 Then kg2 = "                         "
        If Len(VSFlexGrid1.TextMatrix(i, 1)) = 1 Then kg2 = "                        "
        If Len(VSFlexGrid1.TextMatrix(i, 1)) = 2 Then kg2 = "                       "
        If Len(VSFlexGrid1.TextMatrix(i, 1)) = 3 Then kg2 = "                      "
        If Len(VSFlexGrid1.TextMatrix(i, 1)) = 4 Then kg2 = "                     "
        If Len(VSFlexGrid1.TextMatrix(i, 1)) = 5 Then kg2 = "                    "
        If Len(VSFlexGrid1.TextMatrix(i, 1)) = 6 Then kg2 = "                   "
        If Len(VSFlexGrid1.TextMatrix(i, 1)) = 7 Then kg2 = "                  "
        
        If Len(VSFlexGrid1.TextMatrix(i, 2)) = 0 Then kg3 = "                         "
        If Len(VSFlexGrid1.TextMatrix(i, 2)) = 1 Then kg3 = "                        "
        If Len(VSFlexGrid1.TextMatrix(i, 2)) = 2 Then kg3 = "                       "
        If Len(VSFlexGrid1.TextMatrix(i, 2)) = 3 Then kg3 = "                      "
        If Len(VSFlexGrid1.TextMatrix(i, 2)) = 4 Then kg3 = "                     "
        If Len(VSFlexGrid1.TextMatrix(i, 2)) = 5 Then kg3 = "                    "
        If Len(VSFlexGrid1.TextMatrix(i, 2)) = 6 Then kg3 = "                   "
        If Len(VSFlexGrid1.TextMatrix(i, 2)) = 7 Then kg3 = "                  "
        
        If Len(VSFlexGrid1.TextMatrix(i, 3)) = 0 Then kg4 = "                         "
        If Len(VSFlexGrid1.TextMatrix(i, 3)) = 1 Then kg4 = "                        "
        If Len(VSFlexGrid1.TextMatrix(i, 3)) = 2 Then kg4 = "                       "
        If Len(VSFlexGrid1.TextMatrix(i, 3)) = 3 Then kg4 = "                      "
        If Len(VSFlexGrid1.TextMatrix(i, 3)) = 4 Then kg4 = "                     "
        If Len(VSFlexGrid1.TextMatrix(i, 3)) = 5 Then kg4 = "                    "
        If Len(VSFlexGrid1.TextMatrix(i, 3)) = 6 Then kg4 = "                   "
        If Len(VSFlexGrid1.TextMatrix(i, 3)) = 7 Then kg4 = "                  "
        
        If Len(VSFlexGrid1.TextMatrix(i, 4)) = 0 Then kg5 = "                         "
        If Len(VSFlexGrid1.TextMatrix(i, 4)) = 1 Then kg5 = "                        "
        If Len(VSFlexGrid1.TextMatrix(i, 4)) = 2 Then kg5 = "                       "
        If Len(VSFlexGrid1.TextMatrix(i, 4)) = 3 Then kg5 = "                      "
        If Len(VSFlexGrid1.TextMatrix(i, 4)) = 4 Then kg5 = "                     "
        If Len(VSFlexGrid1.TextMatrix(i, 4)) = 5 Then kg5 = "                    "
        If Len(VSFlexGrid1.TextMatrix(i, 4)) = 6 Then kg5 = "                   "
        If Len(VSFlexGrid1.TextMatrix(i, 4)) = 7 Then kg5 = "                  "
        
        If i <> 0 Then List1.AddItem VSFlexGrid1.TextMatrix(i, 0) + kg1 + VSFlexGrid1.TextMatrix(i, 1) + kg2 + VSFlexGrid1.TextMatrix(i, 2) + kg3 + VSFlexGrid1.TextMatrix(i, 3) + kg4 + VSFlexGrid1.TextMatrix(i, 4) + kg5 + VSFlexGrid1.TextMatrix(i, 5)
    Next i
    
    List1.AddItem ""
    List1.AddItem "----计算结果----"
    
    '计算平均弯沉值
    lp = 0
    sgm = 0
    num = 0
    For i = 1 To VSFlexGrid1.Rows - 2
        If Val(VSFlexGrid1.TextMatrix(i, 1)) <> 0 Or Val(VSFlexGrid1.TextMatrix(i, 2)) <> 0 Then
            lp = lp + Val(VSFlexGrid1.TextMatrix(i, 5))
            num = num + 1
        End If
    Next i
    lp = lp / num       '平均弯沉值
    
    '计算标准差
    For i = 1 To VSFlexGrid1.Rows - 2
        If Val(VSFlexGrid1.TextMatrix(i, 1)) <> 0 Or Val(VSFlexGrid1.TextMatrix(i, 2)) <> 0 Then
            sgm = sgm + (lp - Val(VSFlexGrid1.TextMatrix(i, 5))) ^ 2
        End If
    Next i
    
    If num <= 1 Then num = 2
    S = Sqr(sgm / (num - 1))
    
    '代表弯沉
    lr = (lp + za * S) * k1 * k2
    
    List1.AddItem "弯沉的平均值   Lp=" + Trim(Str(Int(lp * 1000 + 0.5) / 1000))
    List1.AddItem "弯沉的标准差    S=" + Trim(Str(Int(S * 1000 + 0.5) / 1000))
    List1.AddItem "保证率系数     Za=" + Trim(Str(Int(za * 1000 + 0.5) / 1000))
    List1.AddItem "路段代表弯沉值 Lr=" + Trim(Str(Int(lr * 1000 + 0.5) / 1000))
    
    
    
    Exit Sub
handlerror:
    xiansh = MsgBox("请检查输入的数据后再试试。", vbInformation, "问题提示")

End Sub

Private Sub Command3_Click()
'删除数据

    On Error GoTo handlerror
    
    xiansh = MsgBox("删除后的数据将是不可恢复的,确定吗?", vbExclamation + vbYesNo, "问题提示")
    
    If xiansh = 7 Then  '否
        Exit Sub
    End If
    
    k = VSFlexGrid1.Rows
    
    If xiansh = 6 Then  '是
        i = VSFlexGrid1.Row
        If Val(VSFlexGrid1.TextMatrix(i, 1)) <> 0 Or Val(VSFlexGrid1.TextMatrix(i, 2)) <> 0 Then
            VSFlexGrid1.RemoveItem (i)
        End If
    End If
    
    For j = 1 To k - 2
        VSFlexGrid1.TextMatrix(j, 0) = j
    Next j
    
    Exit Sub

handlerror:
    xiansh = MsgBox("在删除数据时出错,请再试试。", vbInformation, "问题提示")

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
    
    With VSFlexGrid1
        .TextMatrix(0, 0) = "序号"
        .TextMatrix(0, 1) = "测定最大值L1(0.01mm)"
        .TextMatrix(0, 2) = "测定最终值L2(0.01mm)"
        .TextMatrix(0, 3) = "检验最大值L3(0.01mm)"
        .TextMatrix(0, 4) = "检验最终值L4(0.01mm)"
        .TextMatrix(0, 5) = "回弹弯沉值LT(0.01mm)"
        
        .RowHeight(0) = 500
        .ColWidth(0) = 500
        .ColWidth(1) = 1200
        .ColWidth(2) = 1200
        .ColWidth(3) = 1200
        .ColWidth(4) = 1200
        .ColWidth(5) = 1200
        .ColAlignment(0) = flexAlignCenterCenter
        .ColAlignment(1) = flexAlignCenterCenter
        .ColAlignment(2) = flexAlignCenterCenter
        .ColAlignment(3) = flexAlignCenterCenter
        .ColAlignment(4) = flexAlignCenterCenter
        .ColAlignment(5) = flexAlignCenterCenter
        .TextMatrix(1, 0) = 1
        .TextMatrix(2, 0) = 2
    End With
    
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = Trim(Str(1))
    Combo1.Clear
    Combo1.AddItem "1、高速公路"
    Combo1.AddItem "2、一级公路"
    Combo1.AddItem "3、二级公路"
    Combo1.AddItem "4、三级公路"
    Combo1.AddItem "5、四级公路"
    Combo1.Text = ""
    
    Text6.Text = Trim(Str(1))
    
    
    Exit Sub
handlerror:
    xiansh = MsgBox("在启动贝克梁测弯沉计算程序时出错,请再试试。", vbInformation, "问题提示")

End Sub

Private Sub Text1_Change()
'T25
    
    On Error GoTo handlerror
    
    t25 = Val(Text1.Text)
    tm = Val(Text2.Text)
    te = Val(Text3.Text)
    t = (t25 + tm + te) / 3
    Text4.Text = Trim(Str(Int(t * 1000 + 0.5) / 1000))
    If Val(Text4.Text) = 0 Then Text4.Text = ""
    
    Exit Sub
handlerror:
    
End Sub

Private Sub Text2_Change()
'Tm
    
    On Error GoTo handlerror
    
    t25 = Val(Text1.Text)
    tm = Val(Text2.Text)
    te = Val(Text3.Text)
    t = (t25 + tm + te) / 3
    Text4.Text = Trim(Str(Int(t * 1000 + 0.5) / 1000))
    If Val(Text4.Text) = 0 Then Text4.Text = ""
    
    Exit Sub
handlerror:
    
End Sub

Private Sub Text3_Change()
'Te
    
    On Error GoTo handlerror
    
    t25 = Val(Text1.Text)
    tm = Val(Text2.Text)
    te = Val(Text3.Text)
    t = (t25 + tm + te) / 3
    Text4.Text = Trim(Str(Int(t * 1000 + 0.5) / 1000))
    If Val(Text4.Text) = 0 Then Text4.Text = ""
    
    Exit Sub
handlerror:
    
End Sub

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

    Call bg1yd
    
End Sub

Private Sub VSFlexGrid1_AfterRowColChange(ByVal OldRow As Long, ByVal OldCol As Long, ByVal NewRow As Long, ByVal NewCol As Long)
'移动表格1

    Call bg1yd
    
End Sub

Private Sub VSFlexGrid1_Click()
'点击表格1

    Call bg1yd
    
End Sub



Public Sub bg1yd()
'表格1

    On Error GoTo handlerror
    
    If VSFlexGrid1.TextMatrix(VSFlexGrid1.Rows - 2, 1) <> "" Then
        VSFlexGrid1.Rows = VSFlexGrid1.Rows + 1
    End If
    
    For i = 1 To VSFlexGrid1.Rows - 1
        VSFlexGrid1.TextMatrix(i, 0) = i
        
        l1 = Val(VSFlexGrid1.TextMatrix(i, 1))
        l2 = Val(VSFlexGrid1.TextMatrix(i, 2))
        l3 = Val(VSFlexGrid1.TextMatrix(i, 3))
        l4 = Val(VSFlexGrid1.TextMatrix(i, 4))
        lt = (l1 - l2) * 2 + (l3 - l4) * 6
        If lt <> 0 Then VSFlexGrid1.TextMatrix(i, 5) = Trim(Str(lt))
        If lt = 0 Then VSFlexGrid1.TextMatrix(i, 5) = ""
    Next i
    
    
    Exit Sub
handlerror:

End Sub

⌨️ 快捷键说明

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