📄 杆端力结果.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form2
Caption = "Form2"
ClientHeight = 5205
ClientLeft = 60
ClientTop = 345
ClientWidth = 9750
LinkTopic = "Form2"
MDIChild = -1 'True
ScaleHeight = 5205
ScaleWidth = 9750
Begin VB.CommandButton Command1
Caption = "查询"
Height = 375
Left = 6360
TabIndex = 2
Top = 4440
Width = 735
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "杆端力结果.frx":0000
Left = 3240
List = "杆端力结果.frx":0025
TabIndex = 1
Text = "梯形荷载"
Top = 4440
Width = 2895
End
Begin MSFlexGridLib.MSFlexGrid Grid1
Height = 4035
Left = 0
TabIndex = 0
Top = 0
Width = 7395
_ExtentX = 13044
_ExtentY = 7117
_Version = 393216
Rows = 11
Cols = 7
RowHeightMin = 300
FormatString = "^ 单元号 |^ N1(kN) |^ Q1(kN) |^ M1(kN.m) |^ N2(kN) |^ Q2(kN) |^ M2(kN.m) "
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim 梁端力(0 To 1000) As 杆端内力
Dim 梁端力1 As 杆端内力
Dim 荷载1 As 单元荷载
Dim 荷载2(0 To 1000) As 单元荷载
Private Sub Command1_Click()
Dim i
Select Case (Combo1.Text)
Case "梯形荷载"
Open Fname & "梯形恒载" For Random As #1 Len = Len(荷载1)
For i = 1 To Ncell - 柱总数
Get #1, i, 荷载2(i)
Next i
Close #1
Call hezai1
Case "均布荷载"
Open Fname & "均布恒载" For Random As #1 Len = Len(荷载1)
For i = 1 To Ncell - 柱总数
Get #1, i, 荷载2(i)
Next i
Close #1
Call hezai1
Case "隔跨隔层活荷载A"
Open Fname & "活荷载A" For Random As #1 Len = Len(荷载1)
For i = 1 To Ncell - 柱总数
Get #1, i, 荷载2(i)
Next i
Close #1
Call hezai1
Case "隔跨隔层活荷载B"
Open Fname & "活荷载B" For Random As #1 Len = Len(荷载1)
For i = 1 To Ncell - 柱总数
Get #1, i, 荷载2(i)
Next i
Close #1
Call hezai1
Case "梯形荷载内力"
Open Fname & "梯形恒载内力" For Random As #1 Len = Len(梁端力1)
For i = 1 To Ncell
Get #1, i, 梁端力(i)
Next i
Close #1
Call nilixsh
Case "均布荷载内力"
Open Fname & "均布恒载内力" For Random As #1 Len = Len(梁端力1)
For i = 1 To Ncell
Get #1, i, 梁端力(i)
Next i
Close #1
Call nilixsh
Case "风荷载"
Open Fname & "风荷载内力" For Random As #1 Len = Len(梁端力1)
For i = 1 To Ncell
Get #1, i, 梁端力(i)
Next i
Close #1
Call nilixsh
Case "地震作用"
Open Fname & "地震作用内力" For Random As #1 Len = Len(梁端力1)
For i = 1 To Ncell
Get #1, i, 梁端力(i)
Next i
Close #1
Call nilixsh
Case "隔跨隔层活荷载A内力"
Open Fname & "活荷载A内力" For Random As #1 Len = Len(梁端力1)
For i = 1 To Ncell
Get #1, i, 梁端力(i)
Next i
Close #1
Call nilixsh
Case "隔跨隔层活荷载B内力"
Open Fname & "活荷载B内力" For Random As #1 Len = Len(梁端力1)
For i = 1 To Ncell
Get #1, i, 梁端力(i)
Next i
Close #1
Call nilixsh
Case "梁不利"
Open Fname & "梁不利" For Random As #1 Len = Len(梁端力1)
Call 自动生成NgnXY
For i = 1 To Ncell - 柱总数
Get #1, i, 梁端力(i)
Next i
Close #1
Call nilixsh1
End Select
End Sub
Private Sub Form_Load()
Dim i, j, k, ii, kk, Ne
Me.Height = 5520
Me.Width = 7600
Me.Caption = 当前荷载 & "杆端内力"
Call nilixsh
End Sub
Sub nilixsh()
Dim i, j, Ne
With Grid1
.FormatString = "^ 单元号 |^ N1(kN) |^ Q1(kN) |^ M1(kN.m) |^ N2(kN) |^ Q2(kN) |^ M2(kN.m)"
.Cols = 7
.Rows = Ncell + 1
If Ncell < 10 Then
.Height = .RowHeight(1) * (Ncell + 2)
End If
For i = 1 To Ncell
.TextMatrix(i, 0) = i
Next i
End With
For Ne = 1 To Ncell '逐个单元
With 梁端力(Ne)
Grid1.TextMatrix(Ne, 1) = Format(.N1, "####.##")
Grid1.TextMatrix(Ne, 2) = Format(.Q1, "####.##")
Grid1.TextMatrix(Ne, 3) = Format(.M1, "####.##")
Grid1.TextMatrix(Ne, 4) = Format(.N2, "####.##")
Grid1.TextMatrix(Ne, 5) = Format(.Q2, "####.##")
Grid1.TextMatrix(Ne, 6) = Format(.M2, "####.##")
End With
Next Ne
End Sub
Sub nilixsh1()
Dim i, j, Ne
With Grid1
.FormatString = "^ 单元号 |^ 跨中Mmax |^ Q1(kN) |^ 跨端M1 |^ N2(kN) |^ Q2(kN) |^ 跨端M2"
.Cols = 7
.Rows = Ncell + 1 - 柱总数
If Ncell < 10 Then
.Height = .RowHeight(1) * (Ncell + 2)
End If
For i = 1 To Ncell - 柱总数
.TextMatrix(i, 0) = 柱总数 + i
Next i
End With
For Ne = 1 To Ncell - 柱总数 '逐个单元
With 梁端力(Ne)
Grid1.TextMatrix(Ne, 1) = Format(.N1, "####.##")
Grid1.TextMatrix(Ne, 2) = Format(.Q1, "####.##")
Grid1.TextMatrix(Ne, 3) = Format(.M1, "####.##")
Grid1.TextMatrix(Ne, 4) = Format(.N2, "####.##")
Grid1.TextMatrix(Ne, 5) = Format(.Q2, "####.##")
Grid1.TextMatrix(Ne, 6) = Format(.M2, "####.##")
End With
Next Ne
End Sub
Sub hezai1()
Dim i, j, Ne
With Grid1
.FormatString = "^ 单元号 |^ 荷载类型 |^ 荷载大小 |^ 荷载位置 "
.Cols = 4
.Rows = Ncell - 柱总数 + 1
If Ncell < 10 Then
.Height = .RowHeight(1) * (Ncell + 2)
End If
For i = 1 To Ncell - 柱总数
.TextMatrix(i, 0) = "第" + Str(i + 柱总数) + "号梁"
Next i
End With
For Ne = 1 To Ncell - 柱总数 '逐个单元
With 荷载2(Ne)
Grid1.TextMatrix(Ne, 1) = Format(.Pq, "####.##")
Grid1.TextMatrix(Ne, 2) = Format(.s, "####.##")
Grid1.TextMatrix(Ne, 3) = Format(.Po, "####.##")
End With
Next Ne
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -