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

📄 frmusu_helpcompany.frm

📁 一个用VB写的财务软件源码
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmUSU_HelpCompany 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "关联单位"
   ClientHeight    =   6780
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5715
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6780
   ScaleWidth      =   5715
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   345
      Left            =   3278
      TabIndex        =   1
      Top             =   6360
      Width           =   1065
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      Height          =   345
      Left            =   1358
      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_HelpCompany.frx":0000
            Key             =   "Collapse"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_HelpCompany.frx":0454
            Key             =   "Expand"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmUSU_HelpCompany.frx":08A8
            Key             =   "Root"
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmUSU_HelpCompany"
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()
    Ok = True
    Me.Hide
End Sub

Private Sub form_load()
    Ok = False
    FullGrid
End Sub

Private Sub FullGrid()
    tVw.Checkboxes = True
    Dim rSt As New Recordset
    tVw.Nodes.Clear
    rSt.Open "Select vcCode,vcName from tMR_Company where cYear='" + glo.sOperateYear + "' order by vcCode", glo.cnnMain, adOpenKeyset, adLockOptimistic
    While rSt.EOF = False
       Call tVw.Nodes.Add(, , "K" + rSt.Fields(0).value, rSt.Fields(0).value + "=" + rSt.Fields(1).value, "Collapse", "Expand")
       rSt.MoveNext
    Wend
    rSt.Close
End Sub

Public Property Get usCode() As String
    Dim i As Integer
    For i = 1 To tVw.Nodes.Count
        If tVw.Nodes.Item(i).Checked = True Then
            usCode = usCode + "," + GetCode(tVw.Nodes(i).text)
        End If
    Next
    If usCode <> "" Then
        usCode = Mid$(usCode, 2)
    End If
End Property

Private Function GetCode(ByVal s As String) As String
    Dim iPos As Integer
    iPos = InStr(1, s, "=")
    If iPos > 0 Then
        GetCode = Mid$(s, 1, iPos - 1)
    Else
        GetCode = s
    End If
End Function

⌨️ 快捷键说明

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