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

📄 取款界面.frm

📁 一个用VB编写的银行模拟系统 链接了数据库
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frmget 
   Caption         =   "取款操作窗口"
   ClientHeight    =   4605
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6315
   LinkTopic       =   "Form4"
   ScaleHeight     =   4605
   ScaleWidth      =   6315
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox TxtName 
      Height          =   375
      Left            =   3120
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   2040
      Width           =   2055
   End
   Begin VB.CommandButton ComQuit 
      Caption         =   "返回到主界面"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3720
      TabIndex        =   3
      Top             =   3360
      Width           =   1815
   End
   Begin VB.CommandButton ComOk 
      Caption         =   "确认取款"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   960
      TabIndex        =   2
      Top             =   3360
      Width           =   1935
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "银行模拟系统——取款界面"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   0
      TabIndex        =   4
      Top             =   0
      Width           =   6375
   End
   Begin VB.Label Label5 
      Caption         =   "请输入您的取款金额:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   480
      TabIndex        =   0
      Top             =   1200
      Width           =   3375
   End
End
Attribute VB_Name = "Frmget"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False





Private Sub ComOk_Click()
On Error GoTo ErrMsg
Call connectDB
adoRS.Open "select * from 银行表 where 卡号='" & Frmlogin.id & " '", adoCon
adoRS.MoveFirst
  Do While Not adoRS.EOF
    If adoRS("余额") - Val(TxtName.Text) < 0 Or (TxtName.Text) = "" Then
    MsgBox "对不起,您的余额不足或是你没有输入取款金额,请减少取款数量或请你存入或金额然后进行取款谢谢合作!", vbExclamation + vbOKOnly, "银行系统提示"
    TxtName.Text = ""
    TxtName.SetFocus
    Else
    adoRS("余额") = adoRS("余额") - Val(TxtName.Text)
    adoRS.Update
    MsgBox "您的取款完成,请返回界面!", vbOKOnly + vbInformation, "银行系统提示"
    TxtName.Text = ""
    End If
    adoRS.MoveNext
 Loop
ErrMsg:
  If Err.Number <> 0 Then
     MsgBox CStr(Err.Number) + Err.Description, vbOKOnly + vbCritical, "银行系统错误提示"
     Exit Sub
  End If
End Sub

Private Sub ComQuit_Click()
Frmget.Hide
Frmmain.Show
End Sub

Private Sub Form_Load()
On Error GoTo ErrMsg
TxtName.Text = ""
ErrMsg:
If Err.Number <> 0 Then
    MsgBox Err.Number & Err.Description, vbOKOnly + vbCritical, "银行系统错误提示"
    Exit Sub
End If
End Sub

⌨️ 快捷键说明

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