frmreceive.frm
来自「银行定储模拟程序」· FRM 代码 · 共 551 行 · 第 1/2 页
FRM
551 行
Left = 1440
Locked = -1 'True
MaxLength = 50
TabIndex = 9
TabStop = 0 'False
Top = 360
Width = 1560
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "重复密码:"
ForeColor = &H00000000&
Height = 180
Index = 4
Left = 3600
TabIndex = 31
Top = 1080
Width = 900
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "储户地址:"
ForeColor = &H00000000&
Height = 180
Index = 8
Left = 480
TabIndex = 18
Top = 1800
Width = 900
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "大写:"
Height = 255
Index = 0
Left = 840
TabIndex = 16
Top = 1440
Width = 615
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "元"
ForeColor = &H00000000&
Height = 180
Index = 5
Left = 3120
TabIndex = 15
Top = 1080
Width = 180
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "存入金额:"
ForeColor = &H00000000&
Height = 180
Index = 7
Left = 480
TabIndex = 14
Top = 1080
Width = 900
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "储蓄种类:"
ForeColor = &H00000000&
Height = 180
Index = 3
Left = 480
TabIndex = 13
Top = 720
Width = 900
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码:"
ForeColor = &H00000000&
Height = 180
Index = 2
Left = 3960
TabIndex = 12
Top = 720
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "姓名:"
ForeColor = &H00000000&
Height = 180
Index = 1
Left = 3960
TabIndex = 11
Top = 360
Width = 540
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户帐号:"
ForeColor = &H000000C0&
Height = 180
Index = 0
Left = 480
TabIndex = 10
Top = 360
Width = 900
End
End
End
Attribute VB_Name = "frmReceive"
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 cmdOK_Click()
If txtPwd <> txtPwdAgain Then
MsgBox "您两次输入的密码不一致,请重新输入密码!", vbExclamation, "注意:"
txtPwd.SetFocus
Exit Sub
End If
If txtUserName = "" Or txtMoney = "" Or txtPwd = "" Or txtAddress = "" Then
MsgBox "请检查 姓名、密码、存款、地址处是否填全!", vbInformation, "提示:"
Exit Sub
End If
Add_New
CurID = CurID + 1 '自动分配的帐号加1
SaveSetting App.EXEName, "ID", "IDNum", CurID '保存当前自动分配帐号数
SaveSetting App.EXEName, "ID", "Date", Year(Now) & Month(Now) & Day(Now)
MsgBox "已成功提交该笔存款!", vbInformation, "提示:"
InitWindow
End Sub
Private Sub Combo1_GotFocus()
ShowFocus Combo1
End Sub
Private Sub Combo1_LostFocus()
LeaveFocus Combo1
If Combo1 <> "定期一年" And Combo1 <> "定期三年" And Combo1 <> "定期五年" Then
Combo1.Text = "定期一年"
End If
End Sub
Private Sub Form_Load()
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2, Me.Width, Me.Height
AniShowFrm Me.hwnd
txtYear = Year(Now): txtMonth = Month(Now): txtday = Day(Now)
lblOperator = CurOperator
lblID = OperatorID
txtUserID = Generate_IDNum()
End Sub
Private Sub Form_Unload(Cancel As Integer)
AniUnloadFrm Me.hwnd
End Sub
Private Sub txtAddress_GotFocus()
ShowFocus txtAddress
End Sub
Private Sub txtAddress_LostFocus()
LeaveFocus txtAddress
End Sub
Private Sub txtMoney_Change()
If Not IsNumeric(txtMoney) And txtMoney <> "" Then
SendKeys "{BS}"
End If
If txtMoney = "0" Then
BigMoney = "零圆"
Else
BigMoney = changemoney(Val(txtMoney))
End If
If txtMoney = "" Then BigMoney = "大写人民币金额"
End Sub
Private Sub txtMoney_GotFocus()
ShowFocus txtMoney
End Sub
Private Sub txtMoney_LostFocus()
LeaveFocus txtMoney
If Not IsNumeric(txtMoney) And txtMoney <> "" Then
MsgBox "金额输入错误,请重新输入!", vbCritical, "提示:"
txtMoney.SetFocus
End If
End Sub
Private Sub txtPwd_Change()
If Len(txtPwd) >= 6 Then
txtPwd = Left(txtPwd, 6)
SendKeys "{tab}"
End If
End Sub
Private Sub txtPwd_GotFocus()
ShowFocus txtPwd
End Sub
Private Sub txtPwd_LostFocus()
LeaveFocus txtPwd
End Sub
Private Sub txtPwdAgain_Change()
If Len(txtPwdAgain) = 6 Then
SendKeys "{tab}"
End If
End Sub
Private Sub txtPwdAgain_GotFocus()
ShowFocus txtPwdAgain
End Sub
Private Sub txtPwdAgain_LostFocus()
LeaveFocus txtPwdAgain
End Sub
Private Sub txtUserName_Change()
If Len(txtUserName) >= 10 Then
SendKeys "{tab}"
End If
End Sub
Private Sub txtUserName_GotFocus()
ShowFocus txtUserName
End Sub
Private Sub txtUserName_LostFocus()
LeaveFocus txtUserName
End Sub
Private Sub Add_New()
Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(App.Path & "\bank.mdb")
Set rs = db.OpenRecordset("存款记录")
With rs
.AddNew
!帐号 = txtUserID
!姓名 = txtUserName
!密码 = Cipher(txtPwd)
!地址 = txtAddress
!储种 = Combo1.Text
!本金 = txtMoney
!存款日期 = Date
!是否挂失 = False
!挂失日期 = Null
!营业员 = CurOperator
!工号 = OperatorID
.Update
End With
End Sub
Private Sub InitWindow()
txtUserID = Generate_IDNum()
txtUserName = ""
txtPwd = ""
txtPwdAgain = ""
txtAddress = ""
txtMoney = ""
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?