frmprepare.frm
来自「银行定储模拟程序」· FRM 代码 · 共 201 行
FRM
201 行
VERSION 5.00
Begin VB.Form frmPrepare
Caption = "备款统计"
ClientHeight = 1170
ClientLeft = 60
ClientTop = 345
ClientWidth = 5940
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 1170
ScaleWidth = 5940
Begin VB.Frame Frame1
Height = 1095
Left = 0
TabIndex = 0
Top = 0
Width = 5895
Begin VB.CommandButton Command1
Caption = "显示款额(&S)"
Height = 375
Left = 3120
TabIndex = 7
Top = 600
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "关闭退出(&C)"
Height = 375
Left = 4440
TabIndex = 6
Top = 600
Width = 1215
End
Begin VB.PictureBox Picture1
BackColor = &H00000000&
ForeColor = &H0000FFFF&
Height = 375
Left = 720
ScaleHeight = 315
ScaleWidth = 1965
TabIndex = 5
Top = 600
Width = 2025
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 360
Left = 3450
TabIndex = 1
Text = "3"
Top = 160
Width = 285
End
Begin VB.Label Label2
Caption = "金额:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 2
Left = 120
TabIndex = 9
Top = 720
Width = 735
End
Begin VB.Label Label2
Caption = "元"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 3
Left = 2760
TabIndex = 8
Top = 720
Width = 255
End
Begin VB.Label Label1
Caption = "date"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 4
Top = 240
Width = 2655
End
Begin VB.Label Label2
Caption = "计算"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 2880
TabIndex = 3
Top = 240
Width = 495
End
Begin VB.Label Label2
Caption = "天内要准备的存款"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 3840
TabIndex = 2
Top = 240
Width = 1815
End
End
End
Attribute VB_Name = "frmPrepare"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim MoneyShow As New mcLCD
Private Sub Command1_Click()
calcMoney
End Sub
Private Sub Command2_Click()
Unload Me
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
MoneyShow.NewLCD Picture1
Label1.Caption = "现在日期:" & Date
MoneyShow.Caption = "0"
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
End Sub
Private Sub calcMoney()
Dim Sum As Double
Sum = 0
Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(App.Path & "\bank.mdb")
Set rs = db.OpenRecordset("存款记录")
Do While Not rs.EOF()
If CashDay(rs!存款日期, rs!储种) < Date + Val(Text1) And rs!是否挂失 = False Then
Sum = Sum + ShowMoney(rs!本金, rs!储种)
MoneyShow.Caption = Int(Sum)
End If
rs.MoveNext
Loop
Me.Caption = "备款金额计算完毕!"
End Sub
Private Sub Form_Unload(Cancel As Integer)
AniUnloadFrm Me.hwnd
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?