📄 frmin_ffdykm.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "Msflxgrd.ocx"
Begin VB.Form frmIN_Ffdykm
Caption = "非法对应科目"
ClientHeight = 6390
ClientLeft = 60
ClientTop = 345
ClientWidth = 9990
Icon = "frmIN_Ffdykm.frx":0000
LinkTopic = "Form1"
ScaleHeight = 6390
ScaleWidth = 9990
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
BorderStyle = 0 'None
Caption = "Frame1"
Height = 615
Left = 60
TabIndex = 3
Top = 5730
Width = 9915
Begin VB.CommandButton cmdPrint
Caption = "预览(&P)"
Height = 375
Left = 1241
TabIndex = 8
Top = 135
Width = 990
End
Begin VB.CommandButton cmdOk
Caption = "确定(&O)"
Height = 375
Left = 7623
TabIndex = 6
Top = 135
Width = 990
End
Begin VB.CommandButton cmdCancel
Caption = "取消(&C)"
Height = 375
Left = 8820
TabIndex = 5
Top = 135
Width = 990
End
Begin VB.CommandButton cmdFind
Caption = "查找(&F)"
Height = 375
Left = 45
TabIndex = 4
Top = 135
Width = 990
End
Begin VB.Label lblMsg
AutoSize = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "注:文字显示不下时,可拖拉前两列的横线,调整行高。科目代码列表以"",""分隔。"
Height = 450
Left = 2437
TabIndex = 7
Top = 135
Width = 4980
WordWrap = -1 'True
End
End
Begin VB.CommandButton cmdKm
Height = 315
Left = 3210
Picture = "frmIN_Ffdykm.frx":0442
Style = 1 'Graphical
TabIndex = 2
Top = 3210
Visible = 0 'False
Width = 315
End
Begin VB.TextBox txtFfdy
Appearance = 0 'Flat
Height = 270
Left = 1170
MaxLength = 254
TabIndex = 1
Top = 3450
Visible = 0 'False
Width = 2600
End
Begin MSFlexGridLib.MSFlexGrid mfgLawless
Height = 5745
Left = 30
TabIndex = 0
Top = 0
Width = 9945
_ExtentX = 17542
_ExtentY = 10134
_Version = 393216
Cols = 4
FixedCols = 2
BackColorFixed = 14737632
BackColorSel = 16777152
ForeColorSel = 16711680
BackColorBkg = -2147483639
GridColor = 16711680
GridColorFixed = 16711680
WordWrap = -1 'True
ScrollTrack = -1 'True
HighLight = 2
FillStyle = 1
GridLinesFixed = 1
AllowUserResizing= 2
PictureType = 1
MousePointer = 15
MouseIcon = "frmIN_Ffdykm.frx":0544
End
End
Attribute VB_Name = "frmIN_Ffdykm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private rstKm As ADODB.Recordset
Private OldRow As Integer '文本输入非法时表格所在行
Private oldTxt As String '保存文本输入非法时的文本
Private Valid As Boolean '输入非法状态
Private Loading As Boolean '窗体加载状态
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdFind_Click()
Dim sTemp As String
Dim i As Integer
sTemp = Trim$("" & OneSeek(vbCrLf & " 请输入要查的科目:" & vbCrLf & vbCrLf & "(按代码查找时,请输入数字系列。)", "", "tZW_Km" & glo.sOperateYear, "Kmdm", "Kmmc", "找不到此科目!"))
If Trim$("" & sTemp) <> "" Then
With mfgLawless
For i = 1 To .Rows - 1
If Trim$("" & .TextMatrix(i, 0)) = sTemp Then Exit For
Next i
If i < .Rows - 1 Then
.row = i
.TopRow = i
.col = 2
Else
If Trim$("" & .TextMatrix(i, 0)) = sTemp Then
.row = .Rows - 1
.TopRow = .Rows - 1
.col = 2
End If
End If
End With
Call mfgLawless_EnterCell
End If
End Sub
Private Sub cmdKm_Click()
frmUSU_KmHelp.MultiSelNode = True
Load frmUSU_KmHelp
frmUSU_KmHelp.Show 1, Me
If frmUSU_KmHelp.Valid Then
If Len(frmUSU_KmHelp.strChk) >= 254 Then
MsgBox "长度超出,请重新选择!", vbInformation
Else
txtFfdy = frmUSU_KmHelp.strChk
End If
End If
End Sub
Private Sub cmdOK_Click()
Dim i As Integer
mfgLawless_LeaveCell
With mfgLawless
For i = 1 To .Rows - 1
glo.cnnMain.Execute "UPDATE tZW_Km" & glo.sOperateYear & " SET cLawless='" & Trim$("" & .TextMatrix(i, 3)) & "' WHERE Kmdm='" & .TextMatrix(i, 0) & "'"
Next i
End With
Unload Me
End Sub
Private Sub cmdPrint_Click()
Dim i As Integer
Dim j As Integer
Dim gc As Integer
Me.MousePointer = 11
With frmcellprint1.cll
.SetRows mfgLawless.Rows + 1, 0
.SetCols mfgLawless.Cols + 1, 0
.MergeCells 1, 1, .GetCols(0), 1
.SetCellString 1, 1, 0, Me.Caption
.SetCellAlign 1, 1, 0, 36
.SetCellFont 1, 1, 0, .FindFontIndex("宋体", 1)
.SetCellFontSize 1, 1, 0, 24
.SetCellFontStyle 1, 1, 0, 2
.SetRowHeight 1, .GetRowBestHeight(1), 1, 0
.SetColWidth 1, mfgLawless.COLWIDTH(0) / 10, 1, 0
.SetColWidth 1, mfgLawless.COLWIDTH(1) / 10, 2, 0
If mfgLawless.COLWIDTH(3) > 0 Then
.SetColWidth 1, mfgLawless.COLWIDTH(3) / 10, 3, 0
Else
.SetColWidth 1, 0, 3, 0
End If
If mfgLawless.COLWIDTH(2) > 0 Then
.SetColWidth 1, mfgLawless.COLWIDTH(2) / 10, 4, 0
Else
.SetColWidth 1, 0, 4, 0
End If
For i = 0 To mfgLawless.Cols - 1
gc = i
If i = 2 Then gc = 3
If i = 3 Then gc = 2
For j = 0 To mfgLawless.Rows - 1
.SetCellString gc + 1, j + 2, 0, mfgLawless.TextMatrix(j, i)
Next j
Next i
.DrawGridLine 1, 2, .GetCols(0), .GetRows(0), 0, 2, vbBlack
.PrintSetHead "", "", "第&P页"
.PrintSetFoot "", "", "打印日期:" + glo.sOperateDate
frmcellprint1.cllprivew
End With
Me.MousePointer = 0
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
MsgBox KeyCode
MsgBox Shift
End Sub
Private Sub form_load()
Dim strFillmfg As String
Loading = True
Set rstKm = New ADODB.Recordset
rstKm.CursorLocation = adUseClient
glo.frmProg.ShowProgress 0
glo.frmProg.Show
glo.frmProg.SetMsg "正在装载数据,请稍候 ..."
If rstKm.State = adStateClosed Then
rstKm.Open "select kmdm,kmmc,clawless from tZW_Km" & glo.sOperateYear & " order by kmdm", _
glo.cnnMain, adOpenStatic, adLockOptimistic
End If
frmUSU_KmHelp.MultiSelNode = True
frmUSU_KmHelp.Visible = False
With mfgLawless
.FormatString = "<科目代码|< 科目名称 |< 非法对应科目名称 |< 非法对应科目代码 "
.Width = Me.Width - 200
.COLWIDTH(0) = 1000
.COLWIDTH(1) = 3500
.COLWIDTH(2) = 5000
.COLWIDTH(3) = 0
.RowHeight(0) = 280
.row = 0
.col = 1
.CellFontBold = True
.CellAlignment = 4
.col = 2
.CellFontBold = True
.CellAlignment = 4
.col = 3
.CellFontBold = True
.CellAlignment = 4
.Rows = 1
.col = 1
.ColAlignment(1) = 1
If Not rstKm.BOF Then rstKm.MoveFirst
While Not rstKm.EOF
If IsNull(rstKm.Fields(2)) Then
strFillmfg = rstKm.Fields(0) & Chr(9) & rstKm.Fields(1) & Chr(9)
Else
strFillmfg = rstKm.Fields(0) & Chr(9) & rstKm.Fields(1) & Chr(9) & AddDiv(rstKm.Fields(2)) & Chr(9) & rstKm.Fields(2)
End If
.AddItem strFillmfg
.RowHeight(.Rows - 1) = 260
.row = .Rows - 1
.CellBackColor = vbWhite
glo.frmProg.ShowProgress Int(.Rows / rstKm.RecordCount * 100)
rstKm.MoveNext
Wend
End With
glo.frmProg.Hide
Unload glo.frmProg
Loading = False
txtFfdy.Visible = False
cmdKm.Visible = False
End Sub
Private Sub Form_Resize()
'9945 10125 5745 6795
If Me.Width > Frame1.Width Then
mfgLawless.Width = Me.Width - 180
Frame1.Width = Me.Width - 180
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -