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

📄 frmusu_helpbillparameter.frm

📁 一个用VB写的财务软件源码
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmUSU_HelpBillParameter 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "关联交易科目"
   ClientHeight    =   6765
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5715
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6765
   ScaleWidth      =   5715
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      Height          =   345
      Left            =   1358
      TabIndex        =   1
      Top             =   6360
      Width           =   1065
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   345
      Left            =   3278
      TabIndex        =   0
      Top             =   6360
      Width           =   1065
   End
   Begin MSComctlLib.TreeView tVw 
      Height          =   6225
      Left            =   0
      TabIndex        =   2
      Top             =   0
      Width           =   5685
      _ExtentX        =   10028
      _ExtentY        =   10980
      _Version        =   393217
      HideSelection   =   0   'False
      Indentation     =   471
      LabelEdit       =   1
      LineStyle       =   1
      Style           =   7
      ImageList       =   "ilsTvw"
      Appearance      =   1
   End
   Begin MSComctlLib.ImageList ilsTvw 
      Left            =   390
      Top             =   6150
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_HelpBillParameter.frx":0000
            Key             =   "Collapse"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_HelpBillParameter.frx":0454
            Key             =   "Expand"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_HelpBillParameter.frx":08A8
            Key             =   "Root"
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmUSU_HelpBillParameter"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public Ok As Boolean

Private Sub cmdCancel_Click()
    Ok = False
    Me.Hide
End Sub

Private Sub cmdOk_Click()
    If tVw.SelectedItem Is Nothing Then
        MsgBox "请选择关联交易科目!", vbInformation, ""
        Exit Sub
    End If
    Ok = True
    Me.Hide
End Sub

Private Sub Form_Load()
    Ok = False
    FullGrid
End Sub

Private Sub FullGrid()
    Dim rSt As New Recordset
    tVw.Nodes.Clear
    Dim tNode As Node
    Dim cNode As Node
    rSt.Open "Select Code,Name from tMR_BillParameter order by Code", glo.cnnMain, adOpenKeyset, adLockOptimistic
    While rSt.EOF = False
        If Not cNode Is Nothing Then
            Do While InStr(1, rSt.Fields(0).value, Mid(cNode.Key, 2)) >= 0
                Set cNode = cNode.Parent
                If cNode Is Nothing Then Exit Do
            Loop
        End If
        If cNode Is Nothing Then
            Set tNode = tVw.Nodes.Add(, , "K" + rSt.Fields(0).value, rSt.Fields(0).value + "=" + rSt.Fields(1).value, "Collapse", "Expand")
        Else
            Set tNode = tVw.Nodes.Add(cNode.Key, tvwChild, "K" + rSt.Fields(0).value, rSt.Fields(0).value + "=" + rSt.Fields(1).value, "Collapse", "Expand")
        End If
        Set cNode = tNode
        rSt.MoveNext
    Wend
    rSt.Close
End Sub

Public Property Get usCode() As String
    Dim iPos As Integer
    iPos = InStr(1, tVw.SelectedItem.text, "=")
    If iPos > 0 Then
        usCode = Mid$(tVw.SelectedItem.text, 1, iPos - 1)
    Else
        usCode = tVw.SelectedItem.text
    End If
End Property

Public Property Get usName() As String
    Dim iPos As Integer
    iPos = InStr(1, tVw.SelectedItem.text, "=")
    If iPos > 0 Then
        usName = Mid$(tVw.SelectedItem.text, iPos + 1)
    Else
        usName = tVw.SelectedItem.text
    End If
End Property

⌨️ 快捷键说明

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