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

📄 frmusu_jg.frm

📁 一个用VB写的财务软件源码
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmUSU_JG 
   Caption         =   "地区选择"
   ClientHeight    =   6270
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   6270
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   2070
      Top             =   3195
      _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_JG.frx":0000
            Key             =   "Collapse"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_JG.frx":0454
            Key             =   "Expand"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_JG.frx":08A8
            Key             =   "Root"
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   345
      Left            =   2753
      TabIndex        =   2
      Top             =   5880
      Width           =   1065
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      Height          =   345
      Left            =   863
      TabIndex        =   1
      Top             =   5880
      Width           =   1065
   End
   Begin MSComctlLib.TreeView tvwJG 
      Height          =   5805
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4650
      _ExtentX        =   8202
      _ExtentY        =   10239
      _Version        =   393217
      LabelEdit       =   1
      Style           =   7
      HotTracking     =   -1  'True
      ImageList       =   "ImageList1"
      Appearance      =   1
   End
End
Attribute VB_Name = "frmUSU_JG"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Valid As Boolean             '确定或决定是否有效
Private rstJg As ADODB.Recordset

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

Private Sub cmdOk_Click()
    MousePointer = vbHourglass
    Valid = True
    If Left(tvwJG.SelectedItem.Key, 1) = "K" Then Me.Hide
    MousePointer = vbDefault
End Sub

Private Sub Form_Load()

    Set rstJg = New ADODB.Recordset
    rstJg.CursorLocation = adUseClient
    tvwJG.Nodes.Add , , "R", "籍贯代码", "Root"
    tvwJG.Nodes("R").Expanded = True
    rstJg.Open "select Name,Code from tRS_TJGDM where code like '%0000' order by Code", _
            glo.cnnMain, adOpenStatic, adLockOptimistic
    
   Call LoadTvw(rstJg, tvwJG, "R", "Code", "Name", "Collapse", "Expand", "")
   
End Sub
Public Property Get JgName()
    JgName = Right(tvwJG.SelectedItem, Len(tvwJG.SelectedItem) - InStr(tvwJG.SelectedItem, "="))
End Property
Public Property Get JgCode()
    JgCode = Right(tvwJG.SelectedItem.Key, Len(tvwJG.SelectedItem.Key) - 1)
End Property

Private Sub tvwJG_DblClick()
    Valid = True
    If Left(tvwJG.SelectedItem.Key, 1) = "K" Then Me.Hide
End Sub

Private Sub tvwJG_NodeClick(ByVal Node As MSComctlLib.Node)
    If Node.Children = 0 Then
        If rstJg.State = adStateOpen Then rstJg.Close
            If InStr(Node.Key, "00") > 0 Then
            If InStr(Node.Key, "0000") > 0 Then
                rstJg.Open "select Name,Code from tRS_TJGDM where code like '" & Mid(Node.Key, 2, 2) & "%' and code not like '%0000' and code like '%00' order by code", glo.cnnMain, adOpenStatic, adLockOptimistic
            Else
                rstJg.Open "select Name,Code from tRS_TJGDM where code not like '%00' and code like '" & Mid(Node.Key, 2, 4) & "%' order by code", glo.cnnMain, adOpenStatic, adLockOptimistic
            End If
            Call LoadtvwSeg(rstJg, tvwJG, Node.Key, "Code", "Name", "Collapse", "Expand")
        End If
    End If
End Sub

⌨️ 快捷键说明

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