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

📄 结构设计.frm

📁 钢结构设计数据库应用
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         EndProperty
         BeginProperty Column10 
            ColumnWidth     =   599.811
         EndProperty
         BeginProperty Column11 
            ColumnWidth     =   599.811
         EndProperty
         BeginProperty Column12 
            ColumnWidth     =   599.811
         EndProperty
         BeginProperty Column13 
            ColumnWidth     =   599.811
         EndProperty
         BeginProperty Column14 
            ColumnWidth     =   599.811
         EndProperty
         BeginProperty Column15 
            ColumnWidth     =   599.811
         EndProperty
         BeginProperty Column16 
            ColumnWidth     =   599.811
         EndProperty
         BeginProperty Column17 
            ColumnWidth     =   599.811
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   324
      Left            =   5400
      Top             =   9840
      Width           =   3468
      _ExtentX        =   6117
      _ExtentY        =   572
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=结构设计.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=结构设计.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "表1槽钢"
      Caption         =   "槽钢"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   13.8
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label3 
      Caption         =   "弹性模量"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   9720
      TabIndex        =   34
      Top             =   5160
      Width           =   1332
   End
   Begin VB.Label Label5 
      Caption         =   "荷载 P"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   15.6
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   492
      Left            =   5640
      TabIndex        =   31
      Top             =   1680
      Width           =   1092
   End
   Begin VB.Label Label4 
      Caption         =   "惯性矩 I "
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   5040
      TabIndex        =   30
      Top             =   4800
      Width           =   1452
   End
   Begin VB.Label Label2 
      Caption         =   "荷载位置 x"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   15.6
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Index           =   0
      Left            =   5760
      TabIndex        =   29
      Top             =   0
      Width           =   1812
   End
   Begin VB.Label Label2 
      Caption         =   "梁长 L"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   15.6
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Index           =   1
      Left            =   5640
      TabIndex        =   28
      Top             =   1080
      Width           =   1092
   End
   Begin VB.Image Image1 
      Height          =   336
      Left            =   2400
      Picture         =   "结构设计.frx":002A
      Top             =   1680
      Width           =   120
   End
   Begin VB.Label Label1 
      Caption         =   "荷載位置"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   15.6
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Index           =   6
      Left            =   6240
      TabIndex        =   9
      Top             =   3600
      Visible         =   0   'False
      Width           =   1332
   End
   Begin VB.Menu mnuNew 
      Caption         =   "New"
   End
   Begin VB.Menu mnuFileIn 
      Caption         =   "FileIn"
   End
   Begin VB.Menu mnuFileOut 
      Caption         =   "FileOut"
   End
   Begin VB.Menu mnuEnd 
      Caption         =   "End"
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a#(100), EE#, II#

'Private Sub Adodc1_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
''    Dim h#, b#, d#, t#, r#, r1#, z0#, sc#
''    h = Val(Text1(1).Text)
''    If h = 0 Then Exit Sub
''    b = Val(Text1(2).Text)
''    d = Val(Text1(3).Text)
''    If b = 0 Then Exit Sub
''    t = Text1(4).Text
''    r = Text1(5).Text
''    r1 = Text1(6).Text
''    z0 = Text1(7).Text
''    TextII = Adodc1.Recordset.Fields(11)
''    TextEE.Text = Adodc2.Recordset.Fields(3)
''    比例 h, sc
''    Draw槽钢断面 h, b, d, t, r, r1, z0, sc, Picture1
'
'End Sub

Private Sub CommandGetData_Click()
    Dim h#, b#, d#, t#, r#, r1#, z0#, sc#
    For i = 0 To 6
        Text1(i) = Adodc1.Recordset.Fields(i + 1)
    Next
    h = Text1(1).Text
    b = Text1(2).Text
    d = Text1(3).Text
    t = Text1(4).Text
    r = Text1(5).Text
    r1 = Text1(6).Text
    z0 = Text1(7).Text
    TextII = Adodc1.Recordset.Fields(11)
    TextEE.Text = Adodc2.Recordset.Fields(3)
    比例 h, sc
    Draw槽钢断面 h, b, d, t, r, r1, z0, sc, Picture1
End Sub

Private Sub CommandAdd_Click()
    Adodc1.Recordset.MoveLast
    a(0) = Adodc1.Recordset.Fields(0)
    For i = 1 To 17
        a(i) = Adodc1.Recordset.Fields(i)
    Next
    Adodc1.Recordset.MoveNext
    Adodc1.Recordset.AddNew
        Adodc1.Recordset.Fields(0) = a(0) + 1
    For i = 1 To 17
        Adodc1.Recordset.Fields(i) = a(i)
    Next
End Sub

Private Sub CommandMoveLast_Click()
    Adodc1.Recordset.MoveLast
End Sub

Private Sub CommandMoveFirst_Click()
    Adodc1.Recordset.MoveFirst
End Sub

Private Sub CommandMoveNext_Click()
    If Not Adodc1.Recordset.EOF Then
        Adodc1.Recordset.MoveNext
    End If
End Sub

Private Sub CommandMovePrev_Click()
    If Not Adodc1.Recordset.BOF Then
        Adodc1.Recordset.MovePrevious
    End If
End Sub

Private Sub Command2_Click()
    Dim x0#, y0#, x#, y#, xP#, x1#, y1#
    x0 = 500
    y0 = 1000
    Cls
    p = Val(TextP.Text)                         '输入
    II = Val(TextII.Text)
    EE = Val(TextEE.Text) * 10000#
    xP = Val(TextxP.Text)
    L = Val(TextL.Text)
    c = 100000000# / EE / II
    If p * c * L = 0 Then MsgBox ("请输入各项数据!") '当荷载位置,荷载大小,I其中任何一个无数据时,显示MSGBOX提示
    Line (x0, y0)-(x0 + L * 50, y0)                 '画梁简图
    Line (x0, y0 - 500)-(x0, y0 + 500)
    For y = y0 - 200 To y0 + 400 Step 200
        Line (x0 - 200, y)-(x0, y - 200)
    Next
    Image1.Left = x0 + xP * 50 - 50
    Image1.Top = y0 - 400
    
    y1 = 0                                              '绘位移图
    x1 = 0
    For x = 0 To xP Step 1
        y2 = p * x * x * (3 * xP - x) / 6 / EE / II * 10000
        x2 = x * 50
        Line (x0 + x1, y0 + y1)-(x0 + x2, y0 + y2), vbRed
        x1 = x2
        y1 = y2
    Next
    y = p * xP * xP * (3 * L - xP) / 6 / EE / II * 10000
    Line -(x0 + L * 50, y0 + y), vbRed
    
    fa = p
    y0 = y0 + 3000
    Line (x0, y0)-(x0 + L * 50, y0)
    y1 = -p * xP * 0.2
    Line (x0, y0 + y1)-(x0 + xP * 50, y0), vbRed        '绘弯矩图
    x1 = 0
    For x = 0 To L Step 2
        If x < xP Then
            y2 = (-fa * xP + p * x) * 0.2
        Else
            y2 = 0
        End If
        x2 = x * 50
        Line (x0 + x1, y0 + y1)-(x0 + x2, y0 + y2), vbRed
        Line (x0 + x2, y0)-(x0 + x2, y0 + y2), vbRed
        x1 = x2
        y1 = y2
    Next
End Sub


Private Sub DataGrid1_Click()
    CommandGetData_Click
End Sub

Private Sub DataGrid2_Click()
    CommandGetData_Click
End Sub

Private Sub Form_Load()
    Form1.Top = 0
    Form1.Left = 0
    x0 = 500
    y0 = 1000
    Cls
    TextxP = HScroll1.Value
    xP = Val(TextxP.Text)
    L = Val(TextL.Text)
    Line (x0, y0)-(x0 + L * 50, y0)                 '画梁简图
    Line (x0, y0 - 500)-(x0, y0 + 500)
    For y = y0 - 200 To y0 + 400 Step 200
        Line (x0 - 200, y)-(x0, y - 200)
    Next
    Image1.Left = x0 + xP * 50 - 50
    Image1.Top = y0 - 400
    Adodc1.Recordset.MoveNext
End Sub

Private Sub mnuEnd_Click()
    End
End Sub

Private Sub mnuFileIn_Click()
    Dim fName$
    CommonDialog1.FileName = "*.txt"
    CommonDialog1.ShowOpen
    fName = CommonDialog1.FileName
    Open fName For Input As #1
    Input #1, n
    For i = 1 To n
    Next
End Sub

Private Sub mnuFileOut_Click()
    Dim fName$
    CommonDialog1.FileName = "*.txt"
    CommonDialog1.ShowOpen
    fName = CommonDialog1.FileName
    Open fName For Output As #9
    Do While Not Adodc1.Recordset.EOF
        For i = 0 To 17
            Print #9, Adodc1.Recordset.Fields(i);
        Next
        Print #9,
        Adodc1.Recordset.MoveNext
    Loop
End Sub

Private Sub HScroll1_Change()
    TextxP = HScroll1.Value
    Command2_Click
End Sub

Private Sub Text1_Change(Index As Integer)
    Dim h#, b#, d#, t#, r#, r1#, z0#, sc#
    If Index = 6 Then
    h = Val(Text1(1).Text)
    b = Val(Text1(2).Text)
    d = Val(Text1(3).Text)
    t = Val(Text1(4).Text)
    r = Val(Text1(5).Text)
    r1 = Val(Text1(6).Text)
    z0 = Val(Text1(7).Text)
    If z0 = 0 Then Exit Sub
    比例 h, sc
    Draw槽钢断面 h, b, d, t, r, r1, z0, sc, Picture1
    End If
End Sub

⌨️ 快捷键说明

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