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

📄 frmpay.frm

📁 一个用vb6.0 编写的 cd出租系统,使用access 数据库
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmpay 
   BackColor       =   &H00FFC0C0&
   Caption         =   "Payment"
   ClientHeight    =   4695
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4245
   Icon            =   "frmpay.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmpay.frx":0E42
   ScaleHeight     =   4695
   ScaleWidth      =   4245
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdclear 
      Caption         =   "C&lear"
      Height          =   495
      Left            =   1560
      TabIndex        =   11
      Top             =   3360
      Width           =   975
   End
   Begin VB.Timer Timer1 
      Interval        =   10
      Left            =   3600
      Top             =   4080
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   2160
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   4200
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.CommandButton cmdcancel 
      Caption         =   "&Cancel"
      Height          =   495
      Left            =   2880
      TabIndex        =   8
      Top             =   3360
      Width           =   1095
   End
   Begin VB.PictureBox picbal 
      BackColor       =   &H00C0C0C0&
      Height          =   495
      Left            =   240
      ScaleHeight     =   435
      ScaleWidth      =   3675
      TabIndex        =   7
      Top             =   2640
      Width           =   3735
   End
   Begin VB.PictureBox picdue 
      BackColor       =   &H00C0C0C0&
      Height          =   495
      Left            =   1920
      ScaleHeight     =   435
      ScaleWidth      =   1995
      TabIndex        =   6
      Top             =   1200
      Width           =   2055
   End
   Begin VB.CommandButton cmdpay 
      Caption         =   "&Pay"
      Height          =   495
      Left            =   240
      TabIndex        =   5
      Top             =   3360
      Width           =   975
   End
   Begin VB.TextBox txtpaid 
      Height          =   495
      Left            =   1920
      TabIndex        =   4
      Top             =   1920
      Width           =   2055
   End
   Begin VB.TextBox txtid 
      Height          =   495
      Left            =   1920
      TabIndex        =   3
      Top             =   480
      Width           =   2055
   End
   Begin VB.Label lbltime 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      Height          =   495
      Left            =   3360
      TabIndex        =   10
      Top             =   120
      Width           =   1215
   End
   Begin VB.Label lbldate 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      Height          =   495
      Left            =   240
      TabIndex        =   9
      Top             =   4080
      Width           =   1455
   End
   Begin VB.Label lblpaid 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      Caption         =   "Amount paid:"
      Height          =   495
      Left            =   240
      TabIndex        =   2
      Top             =   2040
      Width           =   1215
   End
   Begin VB.Label lbldue 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      Caption         =   "Amount Due:"
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   1320
      Width           =   1215
   End
   Begin VB.Label lblid 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      Caption         =   "Member ID:"
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   600
      Width           =   1215
   End
End
Attribute VB_Name = "frmpay"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdcancel_Click()
Unload Me
End Sub

Private Sub cmdclear_Click()
txtid.Text = ""
picdue.Cls
txtpaid.Text = ""
picbal.Cls
txtid.SetFocus
End Sub

Private Sub cmdpay_Click()
If txtid.Text <> "" Then
    If txtpaid.Text <> "" Then
    With Data1.Recordset
    .Edit
    !last_payment = txtpaid
    !amount_due = !amount_due - txtpaid
    .Update
    MsgBox "Payment successfull! Your account balance now is: RM" & !amount_due, vbInformation
    picbal.Print "Your balance now is: RM", !amount_due
    End With
    Else
        MsgBox "Please enter the amount to be paid!", vbExclamation
    End If
Else
    MsgBox "Please enter the member ID!", vbExclamation
End If
End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path & "/video.mdb"
Data1.RecordSource = "SELECT * FROM member"
lbldate.Caption = Date
End Sub

Private Sub displayinfo()
With Data1.Recordset
    .FindFirst ("id='" & txtid & "'")
    If .NoMatch = False Then
        picdue.Print !amount_due
    Else
        MsgBox "Data not found!!!", vbExclamation
        txtid.Text = ""
    End If
End With
End Sub
Private Sub txtid_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    Call displayinfo
End If
End Sub
Private Sub Timer1_Timer()
lbltime.Caption = Time$
End Sub

⌨️ 快捷键说明

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