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

📄 frmtxcx.frm

📁 针对各种管理系统提供有的VB源代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         OLEDBFile       =   ""
         DataSourceName  =   "Facility"
         OtherAttributes =   ""
         UserName        =   "sa"
         Password        =   ""
         RecordSource    =   "select * from 设备运行检查状况记录表"
         Caption         =   "Adodc4"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin MSAdodcLib.Adodc Adodc3 
         Height          =   345
         Left            =   540
         Top             =   7380
         Visible         =   0   'False
         Width           =   1365
         _ExtentX        =   2408
         _ExtentY        =   609
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   3
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "DSN=Facility"
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   "Facility"
         OtherAttributes =   ""
         UserName        =   "sa"
         Password        =   ""
         RecordSource    =   "select * from 设备运行检查状况记录表 where 1>2"
         Caption         =   "Adodc3"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin MSAdodcLib.Adodc Adodc2 
         Height          =   330
         Left            =   480
         Top             =   6450
         Visible         =   0   'False
         Width           =   1305
         _ExtentX        =   2302
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   3
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "DSN=Facility"
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   "Facility"
         OtherAttributes =   ""
         UserName        =   "sa"
         Password        =   ""
         RecordSource    =   "select *  from  链表"
         Caption         =   "Adodc2"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   600
         Top             =   6840
         Visible         =   0   'False
         Width           =   1305
         _ExtentX        =   2302
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   4
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   3
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "DSN=Facility"
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   "Facility"
         OtherAttributes =   ""
         UserName        =   "sa"
         Password        =   ""
         RecordSource    =   "select *  from  链表"
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin MSComctlLib.TreeView TreeView1 
         Height          =   8325
         Left            =   60
         TabIndex        =   1
         Top             =   180
         Width           =   2595
         _ExtentX        =   4577
         _ExtentY        =   14684
         _Version        =   393217
         HideSelection   =   0   'False
         LineStyle       =   1
         Style           =   7
         HotTracking     =   -1  'True
         Appearance      =   1
         MouseIcon       =   "FRMTXCX.frx":0239
         OLEDropMode     =   1
      End
   End
End
Attribute VB_Name = "FRMTXCX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Form_Load()
On Error Resume Next
    For Each TextBox In Me.Controls
        TextBox.Font.Name = "宋体"
        TextBox.Font.Size = 9
    Next
   
   Dim nodX As Node
   Dim F1 As String
   
   Sql = "select * from 链表 where 上级='无'"
   Set rs = ConnWZ.Execute(Sql)
   Do While Not rs.EOF
        F1 = rs("值")
        Set nodX = TreeView1.Nodes.Add(, , F1, F1)
        sql1 = "select * from 链表 where 上级='" & F1 & "'"
        Set rs1 = ConnWZ.Execute(sql1)
        Do While Not rs1.EOF
            f2 = rs1("值")
            Set nodX = TreeView1.Nodes.Add(F1, tvwChild, rs1("值"), rs1("值"))
            sql2 = "select * from 链表 where 上级='" & f2 & "'"
            Set rs2 = ConnWZ.Execute(sql2)
            Do While Not rs2.EOF
                F3 = rs2("值")
                Set nodX = TreeView1.Nodes.Add(f2, tvwChild, rs2("值"), rs2("值"))
                Sql3 = "select * from 链表 where 上级='" & F3 & "'"
                Set rs3 = ConnWZ.Execute(Sql3)
                Do While Not rs3.EOF
                    Set nodX = TreeView1.Nodes.Add(F3, tvwChild, rs3("值"), rs3("值"))
                    rs3.MoveNext
                Loop
            'Set nodX = TreeView1.Nodes.Add("R", tvwChild, "C4", "Child 4")
                rs2.MoveNext
            Loop
            rs1.MoveNext
        Loop
        rs.MoveNext
   Loop
   
'   nodX.EnsureVisible
   'TreeView1.Style = tvwTreelinesText '样式 4。
   TreeView1.BorderStyle = vbFixedSingle
End Sub

Private Sub Form_Click()
   Dim i As Integer
   Dim strNodes As String
   For i = 1 To TreeView1.Nodes.Count
   strNodes = strNodes & TreeView1.Nodes(i).Index & " " & _
   "Key: " & TreeView1.Nodes(i).Key & " " & _
   "Text: " & TreeView1.Nodes(i).Text & vbLf
   Next i
   MsgBox strNodes
End Sub


Private Sub Form_Unload(Cancel As Integer)
    SBGCGL.Picture1.Visible = True
End Sub

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
    Adodc2.Refresh
    Do While Not Adodc2.Recordset.EOF
        If Node.Text = Adodc2.Recordset("值") Then
            Adodc1.RecordSource = "select * from 链表 where 值='" & Node.Text & "'"
            Adodc1.Refresh
            
            Exit Do
        End If
        Adodc2.Recordset.MoveNext
    Loop
    'Adodc1.Recordset.CLOSE
    Adodc4.Refresh
    Do While Not Adodc4.Recordset.EOF
        If Node.Text = Adodc4.Recordset("设备名称") Then
            Adodc3.RecordSource = "select * from 设备运行检查状况记录表 where 设备名称='" & Node.Text & "'"
            Adodc3.Refresh
            Adodc3.Recordset.MoveLast
            Exit Do
        End If
        Adodc4.Recordset.MoveNext
    Loop
End Sub

⌨️ 快捷键说明

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