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

📄 frmcashflowcard.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmCashFlowCard 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "新增现金流量项目"
   ClientHeight    =   1650
   ClientLeft      =   2220
   ClientTop       =   2310
   ClientWidth     =   5340
   HelpContextID   =   10238
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form2"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1650
   ScaleWidth      =   5340
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox txtCashFlow 
      Height          =   270
      Index           =   1
      Left            =   2640
      TabIndex        =   3
      Top             =   840
      Width           =   975
   End
   Begin VB.TextBox txtCashFlow 
      Height          =   285
      Index           =   0
      Left            =   240
      MaxLength       =   70
      TabIndex        =   1
      Top             =   840
      Width           =   2025
   End
   Begin VB.CommandButton cmdCashFlow 
      Height          =   350
      Index           =   2
      Left            =   4000
      Style           =   1  'Graphical
      TabIndex        =   6
      Tag             =   "1009"
      Top             =   1080
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdCashFlow 
      Cancel          =   -1  'True
      Height          =   350
      Index           =   1
      Left            =   4000
      Style           =   1  'Graphical
      TabIndex        =   5
      Tag             =   "1002"
      Top             =   630
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdCashFlow 
      Height          =   350
      Index           =   0
      Left            =   4000
      Style           =   1  'Graphical
      TabIndex        =   4
      Tag             =   "1001"
      Top             =   180
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.Label lblTax 
      Caption         =   "行次(&S)"
      Height          =   225
      Index           =   1
      Left            =   2640
      TabIndex        =   2
      Top             =   300
      Width           =   1005
   End
   Begin VB.Label lblTax 
      Caption         =   "现金流量项目名称(&N)"
      Height          =   225
      Index           =   0
      Left            =   240
      TabIndex        =   0
      Top             =   300
      Width           =   2205
   End
End
Attribute VB_Name = "frmCashFlowCard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'                                                                        '
'功能:    完成现金流量项目的增、删、改。                           '
'卡片接口:             EditCard 参数: lngID 记录的ID号                   '
'作用:                         LNGID为零是增加记录、其它为编辑记录       '
'                      DelCard 参数: lngID 记录的ID号                       '
'作用:                          删除ID号为LNGID的记录                    '
'作者:     郑权
'1999.1.12
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Option Explicit

Private mstrCashFlowName As String
Private mstrCashFlowNO As String

Private mblnIsNew As Boolean
Private mblnIsChanged As Boolean
Private mlngCashFlowID As Integer
Private mblnIsFirst As Boolean
'Private WithEvents mclsMainControl As MainControl               '主控对象

Public Property Get getID()
    getID = mlngCashFlowID
End Property

Private Sub cmdCashFlow_Click(Index As Integer)
    
    Select Case Index
           Case 0
                If SaveCard Then
                   Unload Me
                End If
           Case 1
                Unload Me
           Case 2
                If Not SaveCard() Then
                   Exit Sub
                End If
                mlngCashFlowID = 0
                InitCard
                txtCashFlow(0).SetFocus
    End Select
    
End Sub

Private Sub Form_Activate()
    SetHelpID Me.HelpContextID
  txtCashFlow(0).SelStart = 0
  txtCashFlow(0).SelLength = StrLen(txtCashFlow(0).Text)
  txtCashFlow(0).SetFocus
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then
        BKKEY Me.ActiveControl.hwnd, vbKeyTab
    End If
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn And Shift = 2 Then
        cmdCashFlow(0).Value = True
    End If
End Sub

Private Sub Form_Load()
        On Error GoTo ErrHandle
'        SetHelpID Me.hwnd, 10238
        mblnIsChanged = False
        Utility.LoadFormResPicture Me
        'Set mclsMainControl = gclsSys.MainControls.Add(Me)
         Exit Sub
         Dim edtErrReturn As ErrDealType
ErrHandle:
         edtErrReturn = Errors.ErrorsDeal
    
         If edtErrReturn = edtResume Then
            Resume
         Else
            On Error Resume Next
            Unload Me
         End If
End Sub

Private Sub Form_Paint()
    FrameBox Me.hwnd, 120, 180, 3800, 1430
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    Dim intResponse As Integer
     
    If UnloadMode = vbFormControlMenu And mblnIsChanged Then
        intResponse = ShowMsg(0, "当前现金流量项目已被修改,是否保存?", _
                     vbYesNoCancel + vbQuestion + MB_TASKMODAL, Caption)
        If intResponse = vbYes Then
           Cancel = Not SaveCard()
        ElseIf intResponse = vbCancel Then
           Cancel = True
        End If
    End If
    If Not Cancel Then mblnIsChanged = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
     'gclsSys.MainControls.Remove Me
    ' Set mclsMainControl = Nothing
    On Error Resume Next
    mblnIsFirst = False
    Utility.UnLoadFormResPicture Me
End Sub

Public Function AddCard(Optional strName As String = "", Optional intModal As Integer = 0) As Long
    mblnIsFirst = True
    mlngCashFlowID = 0
    mblnIsNew = True
    InitCard strName
    Show intModal
    AddCard = mlngCashFlowID
End Function

Public Sub EditCard(ByVal lngID As Long, Optional intModal As Integer = 0)
    mblnIsFirst = True
    If Not CheckIDUsed("ETSetting", "lngETSettingID", lngID) Then
        ShowMsg 0, "该现金流量项目不存在,不能进行修改!", _
                  vbExclamation + MB_TASKMODAL, Caption
        Unload Me
    Else
        mlngCashFlowID = lngID
        mblnIsNew = False
        InitCard
        Caption = "修改现金流量项目"

⌨️ 快捷键说明

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