📄 frmbalance.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmBalance
Caption = "余额调节表"
ClientHeight = 4635
ClientLeft = 1245
ClientTop = 1185
ClientWidth = 9345
HelpContextID = 60102
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4635
ScaleWidth = 9345
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdPrint
Height = 350
Index = 1
Left = 6960
Style = 1 'Graphical
TabIndex = 6
Tag = "1022"
Top = 810
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdPrint
Height = 350
Index = 0
Left = 6960
Style = 1 'Graphical
TabIndex = 5
Tag = "1012"
Top = 420
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.ComboBox cboTable
Height = 300
Index = 1
Left = 5310
Style = 2 'Dropdown List
TabIndex = 3
Top = 60
Width = 1515
End
Begin VB.ComboBox cboTable
Height = 300
Index = 0
Left = 816
Style = 2 'Dropdown List
TabIndex = 1
Top = 60
Width = 2580
End
Begin MSFlexGridLib.MSFlexGrid msgTable
Height = 3375
Left = 45
TabIndex = 4
Top = 420
Width = 6810
_ExtentX = 12012
_ExtentY = 5953
_Version = 393216
Cols = 5
FixedCols = 0
BackColorBkg = 16777215
GridLines = 0
SelectionMode = 1
AllowUserResizing= 1
FormatString = "| 项目 |> 金额 | 项目 |> 金额 "
End
Begin VB.Label lblTable
Caption = "币种(&C)"
Height = 180
Index = 1
Left = 4590
TabIndex = 2
Top = 105
Width = 660
End
Begin VB.Label lblTable
AutoSize = -1 'True
Caption = "科目(&A)"
Height = 180
Index = 0
Left = 90
TabIndex = 0
Top = 108
Width = 648
End
End
Attribute VB_Name = "frmBalance"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''
'
'余额调节表窗体
'
'作者:苏涛
'
'日期:1998-07-03
'
''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Option Compare Text
Private Const lngViewId = 33
Public mlngAcnID As Long
Public mlngCurID As Long
Private mblnIsInit As Boolean
Private mbytCurDec As Byte
Private mclsGrid As Grid
Private mrecBankAccount As rdoResultset
Private mstrStartDate As String
Private mstrEndDate As String
Private Sub cboTable_Click(index As Integer)
If index = 0 Then
If mlngAcnID = cboTable(0).ItemData(cboTable(0).ListIndex) Then Exit Sub
mlngAcnID = cboTable(0).ItemData(cboTable(0).ListIndex)
mlngCurID = 0
ElseIf index = 1 Then
If mlngCurID = cboTable(1).ItemData(cboTable(1).ListIndex) Then Exit Sub
mlngCurID = cboTable(1).ItemData(cboTable(1).ListIndex)
End If
InitCurrencyList
RefreshGrid
End Sub
Private Sub CmdPrint_Click(index As Integer)
If index = 0 Then
FilePrint
Else
Unload Me
End If
End Sub
Private Sub Form_Activate()
SetHelpID Me.HelpContextID
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyEscape Then cmdPrint(1).Value = True
End Sub
Private Sub Form_Load()
Dim i As Integer
Dim edtErrReturn As ErrDealType
On Error GoTo ErrHandle
mblnIsInit = True
' SetHelpID hwnd, 60102
Utility.LoadFormResPicture Me
For i = 0 To msgTable.Cols - 1
msgTable.FixedAlignment(i) = flexAlignCenterCenter
Next i
mlngAcnID = frmCollate.AccountID
mlngCurID = frmCollate.CurrencyID
InitAccountList
InitCurrencyList
Set mclsGrid = New Grid
Set mclsGrid.Grid = msgTable
mclsGrid.SetupStyle
msgTable.FixedCols = 1
RefreshGrid
SetColWidth
Exit Sub
ErrHandle:
edtErrReturn = Errors.ErrorsDeal
If edtErrReturn = edtResume Then
Resume
Else
On Error Resume Next
Unload Me
End If
End Sub
Private Sub SetColWidth()
Dim i As Integer, strColWidth As String
strColWidth = GetSetting(App.title, "Balance", "ColWidth")
If strColWidth <> "" Then
msgTable.ColWidth(1) = StringOut(strColWidth, ",")
msgTable.ColWidth(2) = StringOut(strColWidth, ",")
msgTable.ColWidth(3) = StringOut(strColWidth, ",")
msgTable.ColWidth(4) = StringOut(strColWidth, ",")
Else
msgTable.width = Me.ScaleWidth - cmdPrint(0).width - 150
msgTable.ColWidth(1) = msgTable.width / 15 * 4.2
msgTable.ColWidth(2) = msgTable.width / 15 * 3.2
msgTable.ColWidth(3) = msgTable.width / 15 * 4.2
msgTable.ColWidth(4) = msgTable.width / 15 * 3.2
End If
End Sub
Private Sub SetFormSize()
Dim lWidth As Long, lHeigh As Long
Dim strFormSize As String
strFormSize = GetSetting(App.title, "Balance", "FormSize")
If strFormSize <> "" Then
lHeigh = StringOut(strFormSize, ",")
lWidth = strFormSize
Me.Height = lHeigh
Me.width = lWidth
End If
End Sub
Private Sub InitAccountList()
Dim lngAcnID As Long, strAcnName As String, strSql As String
cboTable(0).Clear
strSql = "SELECT * FROM BANKACCOUNTVIEW ORDER BY lngAccountID,lngCurrencyID"
Set mrecBankAccount = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
With mrecBankAccount
If Not .EOF Then
lngAcnID = !lngAccountID
cboTable(0).AddItem Trim$(!strAccountCode) & String(4, " ") _
& Trim$(!strAccountName)
If mlngAcnID = !lngAccountID Then strAcnName = Trim$(!strAccountCode) _
& String(4, " ") & Trim$(!strAccountName)
cboTable(0).ItemData(cboTable(0).NewIndex) = !lngAccountID
.MoveNext
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -