📄 frmin_summary.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{7802D41A-28B0-43C4-95EA-17B7E32337D1}#1.0#0"; "CellCtrl5.ocx"
Begin VB.Form frmIN_Summary
BorderStyle = 1 'Fixed Single
Caption = "凭证摘要"
ClientHeight = 5805
ClientLeft = 45
ClientTop = 615
ClientWidth = 6990
HelpContextID = 1027
Icon = "frmIN_Summary.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5805
ScaleWidth = 6990
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin CELL50Lib.Cell Cllr
Height = 4455
Left = 0
TabIndex = 8
Top = 1320
Width = 6975
_Version = 65536
_ExtentX = 12303
_ExtentY = 7858
_StockProps = 0
End
Begin VB.CommandButton cmdKmHelp
Caption = "..."
Height = 240
Left = 6345
TabIndex = 4
Top = 585
Width = 420
End
Begin VB.TextBox txtKmdm
Height = 285
Left = 3060
TabIndex = 3
Top = 585
Width = 3210
End
Begin VB.TextBox txtName
Height = 285
Left = 720
MaxLength = 40
TabIndex = 2
Top = 915
Width = 6030
End
Begin VB.TextBox txtCode
Height = 285
Left = 720
MaxLength = 10
TabIndex = 1
Top = 585
Width = 1215
End
Begin MSComctlLib.Toolbar tBr
Align = 1 'Align Top
Height = 555
Left = 0
TabIndex = 6
Top = 0
Width = 6990
_ExtentX = 12330
_ExtentY = 979
ButtonWidth = 820
ButtonHeight = 926
AllowCustomize = 0 'False
Appearance = 1
Style = 1
ImageList = "ilsTbr"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 18
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "打印"
Key = "Print"
ImageKey = "Print"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "预览"
Key = "Preview"
ImageKey = "Preview"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "增加"
Key = "Append"
ImageKey = "Append"
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "修改"
Key = "Modify"
ImageKey = "Modify"
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删除"
Key = "Delete"
ImageKey = "Delete"
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存"
Key = "Save"
ImageKey = "Save"
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "取消"
Key = "Cancel"
ImageKey = "Cancel"
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Object.Visible = 0 'False
Style = 3
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Object.Visible = 0 'False
Caption = "首条"
Key = "First"
ImageKey = "First"
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Object.Visible = 0 'False
Caption = "上条"
Key = "Previous"
ImageKey = "Previous"
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Object.Visible = 0 'False
Caption = "下条"
Key = "Next"
ImageKey = "Next"
EndProperty
BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Object.Visible = 0 'False
Caption = "末条"
Key = "Last"
ImageKey = "Last"
EndProperty
BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "选入"
Key = "Selected"
ImageKey = "Selected"
EndProperty
BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "帮助"
Key = "Help"
ImageIndex = 16
EndProperty
BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "Quit"
ImageKey = "Quit"
EndProperty
EndProperty
BorderStyle = 1
End
Begin MSComctlLib.ImageList ilsTbr
Left = 5760
Top = 240
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 16
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":014A
Key = "Append"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":059E
Key = "Modify"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":09F2
Key = "Delete"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":0B06
Key = "Save"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":104A
Key = "Cancel"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":158E
Key = "First"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":16AA
Key = "Last"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":17C6
Key = "Previous"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":1926
Key = "Next"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":1A86
Key = "Quit"
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":1EE2
Key = "Query"
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":21FE
Key = "Locate"
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":2652
Key = "Selected"
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":2AA6
Key = "Preview"
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":2FEA
Key = "Print"
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmIN_Summary.frx":352E
Key = ""
EndProperty
EndProperty
End
Begin VB.Label lblKmdm
AutoSize = -1 'True
Caption = "科目代码:"
Height = 180
Left = 2160
TabIndex = 7
Top = 630
Width = 810
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "内容(&N):"
Height = 180
Left = 0
TabIndex = 5
Top = 930
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "代码(&C):"
Height = 180
Left = 0
TabIndex = 0
Top = 615
Width = 720
End
Begin VB.Menu mnuFile
Caption = "文件(&F)"
Begin VB.Menu mnuFilePrint
Caption = "打印(&P)"
Shortcut = ^P
End
Begin VB.Menu mnuFilePreview
Caption = "打印预览(&V)"
End
Begin VB.Menu mnuDiv1
Caption = "-"
End
Begin VB.Menu mnuFileExit
Caption = "退出(&X)"
End
End
Begin VB.Menu mnuEdit
Caption = "编辑(&E)"
Begin VB.Menu mnuEditAppend
Caption = "增加(&N)"
Shortcut = ^A
End
Begin VB.Menu mnuEditModify
Caption = "修改(&M)"
Shortcut = ^M
End
Begin VB.Menu mnuEditDelete
Caption = "删除(&D)"
Shortcut = ^D
End
Begin VB.Menu mnuEditSave
Caption = "保存(&S)"
Shortcut = ^S
End
Begin VB.Menu mnuEditCancel
Caption = "取消(&C)"
End
Begin VB.Menu mnuDiv2
Caption = "-"
End
Begin VB.Menu mnuEditSelected
Caption = "选入(&T)"
Shortcut = ^T
End
End
Begin VB.Menu mnuBrowse
Caption = "浏览(&B)"
Enabled = 0 'False
Visible = 0 'False
Begin VB.Menu mnuBrowseFirst
Caption = "首条(&F)"
End
Begin VB.Menu mnuBrowsePrevious
Caption = "前一条(&P)"
End
Begin VB.Menu mnuBrowseNext
Caption = "下一条(&N)"
End
Begin VB.Menu mnuBrowseLast
Caption = "末条(&L)"
End
End
Begin VB.Menu mnuHelp
Caption = "帮助(&H)"
Begin VB.Menu mnuHelpTheme
Caption = "帮助主题(&H)"
Shortcut = {F1}
End
End
End
Attribute VB_Name = "frmIN_Summary"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 0
Const sTable = "tZW_Zywh"
Const sFIELD_CODE = "DmID"
Const sFIELD_NAME = "Name"
Const HEIGHT_HEAD = 450
Const HEIGHT_GRID = 350
Private m_sName As String
Private m_sStatus As String
Private m_sKmdm As String
Public ubSelectStatus As Boolean
Public Ok As Boolean
Public Property Get usName() As String
usName = m_sName
End Property
Private Sub cllR_mousedclick(ByVal Col As Long, ByVal Row As Long)
If ubSelectStatus Then
If Row > 2 Then
m_sName = Cllr.GetCellString(3, Row, 0)
Ok = True
Me.Hide
End If
End If
End Sub
Private Sub CllR_SelChanged(ByVal col1 As Long, ByVal row1 As Long, ByVal col2 As Long, ByVal row2 As Long)
Dim rstKm As New ADODB.Recordset
If row2 > 2 Then
txtCode.text = Cllr.GetCellString(1, row2, 0)
txtCode.Tag = Cllr.GetCellString(1, row2, 0)
rstKm.Open "Select IsEndKm,Kmdm from tZW_Km" + glo.sOperateYear + _
" where Kmdm='" + Cllr.GetCellString(2, row2, 0) + "'", glo.cnnMain, adOpenDynamic, adLockOptimistic
If Not rstKm.EOF Then
txtKmdm.text = rstKm.Fields("kmdm").value
Else
txtKmdm.text = ""
End If
rstKm.Close
txtKmdm.Tag = Cllr.GetCellString(2, row2, 0)
txtName.text = Cllr.GetCellString(3, row2, 0)
ControlMenu "Cancel"
Else
txtCode.text = ""
txtCode.Tag = ""
txtName.text = ""
txtKmdm.text = ""
txtKmdm.Tag = ""
ControlMenu ""
End If
End Sub
Private Sub cmdKMHelp_Click()
With frmUSU_KmHelp
.MultiSelNode = False
.ubSelAll = True
Load frmUSU_KmHelp
.Show 1
If .Valid Then
txtKmdm.text = .SubjectCode
txtKmdm.Tag = .SubjectCode
End If
Unload frmUSU_KmHelp
End With
End Sub
Private Sub form_load()
Ok = False
m_sName = ""
SetGrid
FillGrid
ControlMenu "Cancel"
End Sub
Private Sub ControlMenu(ByVal Key As String)
Select Case Key
Case "New"
m_sStatus = "新增"
tbr.Buttons("Append").Enabled = False
tbr.Buttons("Modify").Enabled = False
tbr.Buttons("Delete").Enabled = False
tbr.Buttons("Save").Enabled = True
tbr.Buttons("Cancel").Enabled = True
mnuEditAppend.Enabled = False
mnuEditModify.Enabled = False
mnuEditDelete.Enabled = False
mnuEditSave.Enabled = True
mnuEditCancel.Enabled = True
tbr.Buttons("Selected").Enabled = False
mnuEditSelected.Enabled = False
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -