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

📄 frmprevvoucher.frm

📁 金算盘软件代码
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmPrevVoucher 
   Caption         =   "转帐分录"
   ClientHeight    =   4665
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7950
   LinkTopic       =   "Form1"
   ScaleHeight     =   4665
   ScaleWidth      =   7950
   Begin MSFlexGridLib.MSFlexGrid grdBrow 
      Height          =   3405
      Left            =   120
      TabIndex        =   0
      Top             =   360
      Width           =   7695
      _ExtentX        =   13573
      _ExtentY        =   6006
      _Version        =   65541
      Cols            =   3
      FixedCols       =   0
      BackColorBkg    =   16777215
      GridColorFixed  =   -2147483639
      FocusRect       =   0
      HighLight       =   0
      GridLines       =   0
      GridLinesFixed  =   0
   End
   Begin VB.Label lblBrowCaption 
      Caption         =   "lblBrowCaption"
      Height          =   195
      Index           =   0
      Left            =   360
      TabIndex        =   4
      Top             =   90
      Width           =   1275
   End
   Begin VB.Label lblTotal 
      BackColor       =   &H8000000E&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "lblTotal"
      Height          =   405
      Left            =   120
      TabIndex        =   3
      Top             =   3780
      Width           =   7695
   End
   Begin VB.Label lblFu 
      Caption         =   "张"
      Height          =   165
      Left            =   7560
      TabIndex        =   2
      Top             =   90
      Width           =   165
   End
   Begin VB.Label lblBrow 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "lblBrow"
      Height          =   195
      Index           =   0
      Left            =   1650
      TabIndex        =   1
      Top             =   90
      Width           =   645
   End
End
Attribute VB_Name = "frmPrevVoucher"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Const IntSpace = 75        '指定上下控件的距离
Const LOrRSpace = 50       '距窗体左右距离
Const Space = 40           'Brow 控件数组之间的距离

Private Sub FieldButton()
    
   
    lblFu.Move Me.ScaleWidth - LOrRSpace - lblFu.Width, IntSpace + 45, 165, 165
    
    Dim i As Integer
    For i = 0 To lblBrowCaption.Count - 1
        lblBrowCaption(i).Height = lblFu.Height
    Next i
    lblBrowCaption(0).Move lblBrowCaption(0).Left, _
                           IntSpace + 45, _
                           8 * lblBrowCaption(0).FontSize * 10, _
                           lblBrowCaption(0).Height
    
    lblBrow(0).Width = 20 * lblBrow(0).FontSize * 10
    lblBrow(0).Move lblBrowCaption(0).Left + lblBrowCaption(0).Width + Space, _
                    IntSpace
                    
                    
    lblBrow(1).Width = 2 * strLen(lblBrow(1).Caption) * lblBrow(1).FontSize * 10
    lblBrow(1).Move lblFu.Left - lblBrow(1).Width - Space, _
                    lblBrow(0).top, _
                    lblBrow(1).Width, _
                    lblBrow(1).Height
                    
    lblBrowCaption(1).Width = 4 * lblBrowCaption(1).FontSize * 10
    lblBrowCaption(1).Move lblBrow(1).Left - lblBrowCaption(1).Width - Space, _
                           lblBrowCaption(0).top, _
                           lblBrowCaption(1).Width, _
                           lblBrowCaption(1).Height
                           
    lblBrowCaption(2).Width = 8 * lblBrowCaption(2).FontSize * 10
    
    lblBrow(2).Move lblBrowCaption(2).Left + lblBrowCaption(2).Width + Space, _
                    Me.ScaleHeight - lblBrow(2).Height - IntSpace, _
                    2 * strLen(lblBrow(2).Caption) * lblBrow(2).FontSize * 10, _
                    lblBrow(2).Height
                    
    lblBrowCaption(2).Move lblBrowCaption(2).Left, _
                           lblBrow(2).top + 45
                           
    lblBrow(3).Width = 2 * strLen(lblBrow(3).Caption) * lblBrow(3).FontSize * 10
    lblBrow(3).Move Me.ScaleWidth - LOrRSpace - lblBrow(3).Width, _
                    lblBrow(2).top, _
                    lblBrow(3).Width, _
                    lblBrow(3).Height
    
    lblBrowCaption(3).Width = 6 * lblBrowCaption(3).FontSize * 10
    lblBrowCaption(3).Move lblBrow(3).Left - lblBrowCaption(3).Width - Space, _
                           lblBrow(3).top + 45, _
                           lblBrowCaption(3).Width, _
                           lblBrowCaption(3).Height
                           
    
    lblTotal.Height = 2 * lblFu.Height
    lblTotal.Move lblTotal.Left, _
                  lblBrow(2).top - lblTotal.Height - IntSpace, _
                  Me.ScaleWidth - 2 * LOrRSpace, _
                  lblTotal.Height
    
    grdBrow.Move grdBrow.Left, _
                 lblBrow(0).top + lblBrow(0).Height + IntSpace, _
                 Me.ScaleWidth - 2 * LOrRSpace, _
                 lblTotal.top - grdBrow.top - 30
                 
End Sub
Private Sub CreateLblBrow(ByVal Index As Integer)
    Dim i As Integer
    For i = 1 To Index
        Load lblBrow(i)
        lblBrow(i).ZOrder
        
        Load lblBrowCaption(i)
        lblBrowCaption(i).ZOrder
    Next i
    
    lblBrowCaption(0).Caption = "转帐名称"
    lblBrowCaption(1).Caption = "附件"
    lblBrowCaption(2).Caption = "结转周期"
    lblBrowCaption(3).Caption = "结转人"
    
    For i = 0 To lblBrow.Count - 1
        lblBrow(i).Caption = ""
        lblBrowCaption(i).Visible = True
        lblBrow(i).Visible = True
    Next i
    
End Sub

Private Sub Form_Load()
    CreateLblBrow 3
    
    lblBrowCaption(0).Left = LOrRSpace
    lblBrowCaption(2).Left = LOrRSpace
    grdBrow.Left = LOrRSpace
    lblTotal.Left = LOrRSpace
    
    Dim j As Integer
    For j = 0 To lblBrow.Count - 1
        lblBrow(j).Height = 255
    Next j
End Sub

Private Sub Form_Resize()
    FieldButton
End Sub

Public Sub ShowList()
    Dim strDebitName As String
    Dim strCreName As String
    Dim intJ As Integer
    Dim strTotal As String
    
    grdBrow.RowHeight(0) = 0
    grdBrow.RowHeight(1) = 0
    With frmTransVoucher
        For intJ = 1 To .grdCol.Rows - 1
            If .grdCol.TextMatrix(intJ, 3) = "借" Then
                strDebitName = Trim(.grdCol.TextMatrix(intJ, 2))
                grdBrow.ColWidth(1) = C2Lng((10 + 2 * strLen(strDebitName)) * 90)
                grdBrow.AddItem .strTransName & vbTab & "借:" & strDebitName & vbTab & Trim(.grdCol.TextMatrix(intJ, 26)) & "  "
            Else
                strCreName = Trim(.grdCol.TextMatrix(intJ, 2))
                grdBrow.AddItem .strTransName & vbTab & "   贷:" & strCreName & vbTab & "     " & Trim(.grdCol.TextMatrix(intJ, 26)) & "  "
                grdBrow.ColWidth(1) = C2Lng((10 + 2 * strLen(strCreName)) * 90)
            End If
        Next intJ
        grdBrow.ColWidth(0) = (4 + strLen(.strTransName)) * 90
        grdBrow.Sort = 5
        lblBrow(0).Caption = .strTransName
        lblBrow(1).Caption = .strFu
        lblBrow(2).Caption = .strPeriod
        lblBrow(3).Caption = .strMan
        strTotal = "借方合计(" & CStr(.DebitMoney) & ")-贷方合计(" & CStr(.CreditMoney) & ") = " & CStr(.DebitMoney - .CreditMoney)
        If .DebitMoney <> .CreditMoney Then
            lblTotal.Caption = "借贷不平:" & strTotal
        Else
            lblTotal.Caption = "借贷平衡:" & strTotal
        End If
        
    End With

    Me.Show
End Sub

⌨️ 快捷键说明

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