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

📄 card.frm

📁 我自己编写的个人财务系统,VB语言,用于个人财务统计,可自己初始化财务类别,密码8127!
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form card 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "账目卡"
   ClientHeight    =   6285
   ClientLeft      =   8340
   ClientTop       =   330
   ClientWidth     =   3135
   Icon            =   "card.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   6285
   ScaleWidth      =   3135
   Begin MSComctlLib.TreeView TreeView1 
      CausesValidation=   0   'False
      Height          =   6165
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4845
      _ExtentX        =   8546
      _ExtentY        =   10874
      _Version        =   393217
      LabelEdit       =   1
      Style           =   7
      BorderStyle     =   1
      Appearance      =   0
   End
End
Attribute VB_Name = "card"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Public Txt As String
Private Sub Form_Load()
query.QU = 1
Me.Top = query.Top
Me.Left = query.Left + query.Width + 20
sid = 1
    Dim oNodex As node
    'Dim nImage As Integer
    'Dim nSelectedImage As Integer
   ' Dim i As Integer
    'Dim sTableNames As String
    'Dim sNodeTable As String
    Set oNodex = TreeView1.Nodes.Add(, , "0_", "科目-------")

    MyOpen rs, "select * from program"
If rs.RecordCount > 0 Then 'make sure there are records in the table
    rs.MoveFirst
    Do While rs.EOF = False
        'nImage = rs.Fields("image")
        'nSelectedImage = rs.Fields("selectedimage")
        If Trim(rs.Fields("parents")) = "0_" Then 'All root nodes have 0_ in the parent field
            Set oNodex = TreeView1.Nodes.Add(, , Trim(rs.Fields("keys")), _
              Trim(rs.Fields("program")))
              'w = tvwChild
        Else 'All child nodes will have the parent key stored in the parent field
            Set oNodex = TreeView1.Nodes.Add(Trim(rs.Fields("parents")), tvwChild, _
               Trim(rs.Fields("keys")), Trim(rs.Fields("program")))
               'w = tvwChild
            'oNodex.EnsureVisible 'expend the TreeView so all nodes are visible
        End If

        rs.MoveNext
    Loop
End If

End Sub

Private Sub Form_Unload(Cancel As Integer)
query.QU = 0
End Sub
Public Sub treeview1_nodeclick(ByVal node As MSComctlLib.node)
'query.T1_LostFocus (Index)
query.Calendar1.Visible = False 'query.CO = 1
If Val(node.Key) = 0 Then 'show all
    MyOpen rs, "select grade from program "
    GoTo L1:
End If
MyOpen rs, "select grade from program where keys='" & node.Key & "'" 'for give the mygrade's value
If rs.EOF Then myGrade = "": GoTo l: 'no result to show
myGrade = rs.Fields("grade")

L1:

query.T3.ForeColor = vbYellow
query.T3.BackColor = vbBlue


Txt = "[" & node.FullPath & "]"
'myKeys = Val(node.Key)
query.myChange (Txt)

Exit Sub
l:
Txt = "[" & node.FullPath & "]"
'On Error GoTo l:

'query.ii = 1
'query.Combo1.Enabled = True
'query.T3_Click


'Exit Sub
'l: MsgBox "超出使用范围!", vbCritical, "错误"
End Sub

⌨️ 快捷键说明

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