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

📄 frmsubinput.frm

📁 较好的工程计算程序功能较强 计算桥梁的跨度等
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmSubInput 
   Caption         =   "输入参数"
   ClientHeight    =   3690
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4260
   LinkTopic       =   "Form1"
   ScaleHeight     =   3690
   ScaleWidth      =   4260
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   435
      Left            =   2940
      TabIndex        =   19
      Top             =   3000
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   435
      Left            =   1860
      TabIndex        =   18
      Top             =   3000
      Width           =   795
   End
   Begin VB.Frame Frame1 
      Caption         =   "输入参数"
      Height          =   1995
      Left            =   240
      TabIndex        =   0
      Top             =   720
      Width           =   3855
      Begin VB.TextBox txtL 
         Height          =   270
         Left            =   2460
         TabIndex        =   8
         Text            =   "1"
         Top             =   300
         Width           =   375
      End
      Begin VB.TextBox txtEI 
         Height          =   270
         Left            =   720
         TabIndex        =   7
         Text            =   "1"
         Top             =   300
         Width           =   375
      End
      Begin VB.Frame Frame2 
         Caption         =   "荷载类型"
         Height          =   615
         Left            =   240
         TabIndex        =   3
         Top             =   660
         Width           =   3375
         Begin VB.OptionButton optNone 
            Caption         =   "无"
            Height          =   255
            Left            =   240
            TabIndex        =   6
            Top             =   240
            Width           =   615
         End
         Begin VB.OptionButton optP 
            Caption         =   "集中荷载"
            Height          =   195
            Left            =   900
            TabIndex        =   5
            Top             =   240
            Width           =   1035
         End
         Begin VB.OptionButton optQ 
            Caption         =   "均布荷载"
            Height          =   195
            Left            =   2160
            TabIndex        =   4
            Top             =   240
            Width           =   1095
         End
      End
      Begin VB.TextBox txtQ 
         Height          =   270
         Left            =   720
         TabIndex        =   2
         Text            =   "1"
         Top             =   1320
         Width           =   495
      End
      Begin VB.TextBox txtPosA 
         Height          =   285
         Left            =   2640
         TabIndex        =   1
         Text            =   "0.5"
         Top             =   1320
         Width           =   435
      End
      Begin VB.Label Label2 
         Caption         =   "m"
         Height          =   195
         Left            =   3000
         TabIndex        =   21
         Top             =   360
         Width           =   255
      End
      Begin VB.Label lbl_PerQ 
         Caption         =   "kN"
         Height          =   195
         Left            =   1320
         TabIndex        =   20
         Top             =   1380
         Width           =   555
      End
      Begin VB.Label Label5 
         Caption         =   "L ="
         Height          =   195
         Left            =   1860
         TabIndex        =   14
         Top             =   360
         Width           =   315
      End
      Begin VB.Label Label4 
         Caption         =   "EI0"
         Height          =   195
         Left            =   1260
         TabIndex        =   13
         Top             =   360
         Width           =   435
      End
      Begin VB.Label Label3 
         Caption         =   "EI = "
         Height          =   195
         Left            =   240
         TabIndex        =   12
         Top             =   360
         Width           =   375
      End
      Begin VB.Label lblQ 
         Caption         =   "P ="
         Height          =   195
         Left            =   300
         TabIndex        =   11
         Top             =   1380
         Width           =   315
      End
      Begin VB.Label lblPosA 
         Caption         =   "a ="
         Height          =   195
         Left            =   2220
         TabIndex        =   10
         Top             =   1380
         Width           =   315
      End
      Begin VB.Label lbl_L 
         Caption         =   "/L"
         Height          =   195
         Left            =   3240
         TabIndex        =   9
         Top             =   1380
         Width           =   255
      End
   End
   Begin VB.Label Label7 
      Caption         =   "跨"
      Height          =   195
      Left            =   1020
      TabIndex        =   17
      Top             =   180
      Width           =   375
   End
   Begin VB.Label lblCurrentI 
      Caption         =   "1"
      Height          =   195
      Left            =   720
      TabIndex        =   16
      Top             =   180
      Width           =   195
   End
   Begin VB.Label Label1 
      Caption         =   "第"
      Height          =   195
      Left            =   360
      TabIndex        =   15
      Top             =   180
      Width           =   255
   End
End
Attribute VB_Name = "frmSubInput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
   EI(CurrentI) = Val(txtEI)
   L(CurrentI) = Val(txtL)
   If optNone = True Then
      Fc(CurrentI) = 0: q(CurrentI) = 0: PosA(CurrentI) = 0
   End If
   If optQ = True Then
      Fc(CurrentI) = 1
      q(CurrentI) = Val(txtQ)
      PosA(CurrentI) = Val(txtPosA)
   End If
   If optP = True Then
      Fc(CurrentI) = 2
      q(CurrentI) = Val(txtQ)
      PosA(CurrentI) = Val(txtPosA)
   
   End If
   
   
   Unload Me
   frmInput.Show
End Sub

Private Sub Command2_Click()
 
 Unload Me
 frmInput.Show
End Sub

Private Sub Form_Load()
 lblCurrentI = Str(CurrentI)
 If EI(CurrentI) = 0 Then
  txtEI = "1"
 Else
  txtEI = Str(EI(CurrentI))
 End If
 If L(CurrentI) = 0 Then
  txtL = 1
 Else
  txtL = Str(L(CurrentI))
 End If
 Select Case Fc(CurrentI)
 Case 0
   Call optNone_Click
 Case 1
   Call optQ_Click
 Case 2
   Call optP_Click
 End Select
End Sub

Private Sub txtPosA_LostFocus()

   Dim temp As Double
    
    temp = Val(txtPosA)
   If temp <= 0 Or temp > 1 Then
     Call MsgBox("a必须在0-1之间!", vbExclamation + vbOKOnly, "错误")
     If PosA(CurrentI) = 0 Then
        Select Case Fc(CurrentI)
          Case 0
            txtPosA = "0"
          Case 1
            txtPosA = "1"
          Case 2
            txtPosA = "0.5"
       End Select
     Else
       txtPosA = Str(PosA(CurrentI))
     End If
   End If

End Sub

Private Sub txtQ_LostFocus()
   Dim temp As Double
    
    temp = Val(txtQ)
   If temp < 0 Then
     Call MsgBox("荷载必须大于零!", vbExclamation + vbOKOnly, "错误")
     txtPosA = Str(q(CurrentI))
   End If

End Sub

Private Sub optNone_Click()
   
   lblQ.Visible = False
   txtQ.Visible = False
   lbl_PerQ.Visible = False
   lblPosA.Visible = False
   txtPosA.Visible = False
   lbl_L.Visible = False
End Sub

Private Sub optP_Click()
   
   lblQ = "P ="
   If q(CurrentI) = 0 Then
     txtQ = 1
   Else
     txtQ = Str(q(CurrentI))
   End If
   lbl_PerQ = "kN"
   If PosA(CurrentI) = 0 Then
     txtPosA = "0.5"
   Else
     txtPosA = Str(PosA(CurrentI))
   End If
   lblQ.Visible = True
   txtQ.Visible = True
   lbl_PerQ.Visible = True
   lblPosA.Visible = True
   txtPosA.Visible = True
   lbl_L.Visible = True

End Sub

Private Sub optQ_Click()
   
   lblQ = "Q ="
   If q(CurrentI) = 0 Then
     txtQ = 1
   Else
     txtQ = Str(q(CurrentI))
   End If
   lbl_PerQ = "kN/m"
   If PosA(CurrentI) = 0 Then
     txtPosA = "1"
   Else
     txtPosA = Str(PosA(CurrentI))
   End If
   lblQ.Visible = True
   txtQ.Visible = True
   lbl_PerQ.Visible = True
   lblPosA.Visible = True
   txtPosA.Visible = True
   lbl_L.Visible = True
   Fc(CurrentI) = 1

End Sub

Private Sub txtEI_LostFocus()
   Dim temp As Double
    
    temp = Val(txtEI)
   If temp <= 0 Then
     Call MsgBox("EI必须大于零!", vbExclamation + vbOKOnly, "错误")
     If L(CurrentI) = 0 Then
       txtEI = "1"
     Else
       txtEI = EI(CurrentI)
     End If
   End If

End Sub

Private Sub txtL_LostFocus()
  
   Dim temp As Double
    
    temp = Val(txtL)
   If temp <= 0 Then
     Call MsgBox("L必须大于零!", vbExclamation + vbOKOnly, "错误")
     If L(CurrentI) = 0 Then
      txtL = "1"
     Else
      txtL = L(CurrentI)
     End If
   End If

  
End Sub

⌨️ 快捷键说明

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