📄 frmtb.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmTB
BackColor = &H00E0E0E0&
BorderStyle = 0 'None
ClientHeight = 3345
ClientLeft = 0
ClientTop = 0
ClientWidth = 2715
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3345
ScaleWidth = 2715
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.Frame fraBK
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
ForeColor = &H80000008&
Height = 3435
Left = 0
TabIndex = 0
Top = -90
Width = 2715
Begin MSFlexGridLib.MSFlexGrid msfgTB
Height = 2850
Left = 0
TabIndex = 3
Top = 90
Width = 2715
_ExtentX = 4789
_ExtentY = 5027
_Version = 393216
Rows = 30
FixedCols = 0
BackColorBkg = 12632256
GridLinesFixed = 1
AllowUserResizing= 1
Appearance = 0
End
Begin VB.CommandButton cmdNo
Appearance = 0 'Flat
BackColor = &H80000009&
Caption = "取消"
Height = 330
Left = 1395
Style = 1 'Graphical
TabIndex = 2
Top = 3015
Width = 870
End
Begin VB.CommandButton cmdYes
BackColor = &H80000009&
Caption = "确定"
Height = 330
Left = 450
Style = 1 'Graphical
TabIndex = 1
Top = 3015
Width = 870
End
End
End
Attribute VB_Name = "frmTB"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private mvarTBName As String
Public Property Let SetTbName(ByVal vData As String)
mvarTBName = vData
End Property
Private Sub cmdNo_Click()
Unload Me
End Sub
Private Sub cmdYes_Click()
Dim tmpStr As String
Dim i, j As Integer
With msfgTB
tmpStr = ""
j = .Rows
For i = 1 To j - 1
If .TextMatrix(i, 0) = "√" Then
tmpStr = tmpStr & .TextMatrix(i, 1) & ","
End If
Next i
If Trim$(tmpStr) <> "" Then
tmpStr = Left(tmpStr, Len(tmpStr) - 1)
End If
End With
With frmNode
.txtTB = Trim$(tmpStr)
End With
Unload Me
End Sub
Private Sub Form_Load()
Dim tmpStr() As String
Dim i, count As Integer
tmpStr = Split(g_WFTemp, ",")
count = UBound(tmpStr)
With msfgTB
.ColAlignment(0) = 5
.ColAlignment(1) = 1
.ColWidth(0) = 300
.ColWidth(1) = 2000
.TextMatrix(0, 1) = "数据表"
For i = 0 To count
.Rows = i + 2
.TextMatrix(i + 1, 1) = tmpStr(i)
If CheckExist(tmpStr(i)) Then
.TextMatrix(i + 1, 0) = "√"
End If
Next i
End With
End Sub
Private Sub msfgTB_Click()
Dim i As Integer
With msfgTB
.ColAlignment(0) = 5
If .Col = 0 Then
If .Text = "√" Then
.Text = ""
Else
.Text = "√"
End If
End If
End With
End Sub
Private Sub msfgTB_SelChange()
Dim i, j As Integer
With msfgTB
If .ColSel = 1 Then Exit Sub
For i = .Row + 1 To .RowSel
If .TextMatrix(i, 0) = "√" Then
.TextMatrix(i, 0) = ""
Else
.TextMatrix(i, 0) = "√"
End If
Next i
End With
End Sub
Private Function CheckExist(vData As String) As Boolean
Dim tmpStr() As String
Dim i, count As Integer
CheckExist = False
tmpStr = Split(mvarTBName, ",")
count = UBound(tmpStr)
For i = 0 To count
If vData = tmpStr(i) Then
CheckExist = True
Exit Function
End If
Next i
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -