📄 frmfirst.frm
字号:
VERSION 5.00
Begin VB.Form frmfirst
BorderStyle = 1 'Fixed Single
Caption = "欢迎使用"
ClientHeight = 2715
ClientLeft = 45
ClientTop = 330
ClientWidth = 7350
Icon = "frmfirst.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmfirst.frx":0442
ScaleHeight = 2715
ScaleWidth = 7350
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Textp2
Height = 345
IMEMode = 3 'DISABLE
Left = 4710
MaxLength = 8
PasswordChar = "*"
TabIndex = 11
Top = 1425
Width = 2070
End
Begin VB.TextBox Textp1
Height = 345
IMEMode = 3 'DISABLE
Left = 1320
MaxLength = 8
PasswordChar = "*"
TabIndex = 10
Top = 1425
Width = 2055
End
Begin VB.CommandButton Comca
Caption = "放弃"
Height = 315
Left = 4245
TabIndex = 9
Top = 1980
Width = 1350
End
Begin VB.CommandButton Comok
Caption = "确定"
Height = 315
Left = 1635
TabIndex = 8
Top = 1980
Width = 1350
End
Begin VB.TextBox Text2
Height = 345
Left = 4680
TabIndex = 5
ToolTipText = "此处输入开始计账时的资金总额"
Top = 885
Width = 1965
End
Begin VB.TextBox Text1
Height = 330
Left = 960
TabIndex = 3
ToolTipText = "此处输入您想开始计账的年月"
Top = 885
Width = 1410
End
Begin VB.Label Label8
Caption = "确认输入:"
Height = 315
Left = 3690
TabIndex = 13
Top = 1470
Width = 960
End
Begin VB.Label Label7
Caption = "用户密码:"
Height = 345
Left = 315
TabIndex = 12
Top = 1455
Width = 990
End
Begin VB.Label Label6
Caption = "注意:开始时间填写好后不能再修改,而资金总额以后可再修改."
ForeColor = &H000000FF&
Height = 255
Left = 90
TabIndex = 7
Top = 2490
Width = 7020
End
Begin VB.Label Label5
Caption = "元"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 6705
TabIndex = 6
Top = 930
Width = 345
End
Begin VB.Label Label4
Caption = "共有资金(包括存款)"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 2520
TabIndex = 4
Top = 930
Width = 2190
End
Begin VB.Label Label3
Caption = "截止到"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 240
TabIndex = 2
Top = 915
Width = 780
End
Begin VB.Label Label2
Caption = "请输入以下数据好进行初始化工作:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 885
TabIndex = 1
Top = 510
Width = 3405
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "欢迎使用个人财务管理系统"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Index = 1
Left = 1680
TabIndex = 0
Top = 120
Width = 4545
End
End
Attribute VB_Name = "frmfirst"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public firdate As String
Public firmoney As Single
Private Sub Comca_Click()
firdate = ""
Unload Me
End Sub
Private Sub Comok_Click()
If Textp2.Text <> Textp1.Text Then
MsgBox "两次输入的密码不相同,请重输。", 48, "提示"
With Textp2
.SelStart = 0
.SelLength = Len(.Text)
.SetFocus
End With
Exit Sub
End If
Dim i As Byte, pas(7) As String, mw
mw = ""
For i = 1 To Len(Textp1.Text)
pas(i - 1) = Mid(Textp1.Text, i, 1)
pas(i - 1) = Chr(Asc(pas(i - 1)) + 50 + i * 2)
mw = mw + pas(i - 1)
Next i
Open App.Path + "\ok.pas" For Output As #1
Write #1, mw
Close #1
firdate = Text1.Text
firmoney = CSng(Text2.Text)
Unload Me
End Sub
Private Sub Form_Load()
Text1.Text = Format(Date, "YY-MM")
Text2.Text = "10000"
End Sub
Private Sub Text1_LostFocus()
If Not IsDate(Text1.Text) Then
With Text1
MsgBox "这里应该输入日期!", 48, "请注意"
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
End If
End Sub
Private Sub Text2_LostFocus()
If Not IsNumeric(Text2.Text) Then
With Text2
MsgBox "这里应该输入金额!", 48, "请注意"
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -