📄 form1.frm
字号:
Height = 375
Left = 4320
TabIndex = 2
Top = 1300
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "注 册"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4320
TabIndex = 1
Top = 1825
Width = 1215
End
Begin VB.Label Label5
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "系统将以管理员登录"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Left = 3120
TabIndex = 22
Top = 120
Width = 2775
End
Begin VB.Label Label4
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "0"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2640
TabIndex = 21
Top = 1875
Width = 705
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "0.00"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1275
TabIndex = 6
Top = 1875
Width = 990
End
End
Begin VB.Label Label6
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "用户名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 240
Left = 0
TabIndex = 24
Top = 240
Visible = 0 'False
Width = 1800
End
Begin VB.Label tim
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
Caption = "还有000分钟"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 255
Left = 0
TabIndex = 23
Top = 0
Visible = 0 'False
Width = 1800
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function SystemParametersInfo Lib "user32" _
Alias "SystemParametersInfoA" (ByVal uAction As Long, _
ByVal uParam As Long, lpvParam As Any, _
ByVal fuWinIni As Long) As Long
Private Const SPI_SCREENSAVERRUNNING = 97
Dim user$(999, 4)
Dim i
Dim o
Private Sub Command1_Click()
If Text1.Text = "fanyi" And Text2.Text = "aibbuemc" Then End
If Text2.Text = user$(o, 2) Then
Dim rtn
rtn = SetWindowPos(Form1.hwnd, -1, 0, 0, 0, 0, 3)
wid = Form1.Width
Form1.WindowState = 0
Form1.Left = (wid - 1800) / 2
Form1.Width = 1800
Form1.Height = 480
Form1.Top = 0
Timer1.Interval = 1000
tim.Visible = True
Label6.Visible = True
Label6.Caption = "用户名:" + user$(o, 1)
Text2.Text = "12345678"
End If
If Text2.Text <> Command1.Tag Then Label5.Visible = True: Label5.Caption = "密码错误"
End Sub
Private Sub Command3_Click()
Picture1.Visible = False
Picture3.Visible = False
Picture2.Visible = True
End Sub
Private Sub Command4_Click()
If Text3.Text <> "" Or Text3.Text <> "输入您的姓名" Then
Open "f:\user" For Output As #1
For b = 1 To i
Print #1, user$(b, 1); ","; user$(b, 2); ","; user$(b, 3); ","; user$(b, 4); ","
Next b
b = b + 1
Print #1, Label2.Caption; ","; Text4.Text; ","; Text3.Text; ","; "0"; ","
Close #1
Picture1.Visible = False
Picture2.Visible = False
Picture3.Visible = True
Text6.Text = Label2.Caption
i = i + 1
End If
End Sub
Private Sub Command5_Click()
Picture2.Visible = False
Picture3.Visible = False
Picture1.Visible = True
End Sub
Private Sub Command6_Click()
Picture1.Visible = False
Picture2.Visible = False
Picture3.Visible = True
End Sub
Private Sub Command7_Click()
Picture1.Visible = True
Picture2.Visible = False
Picture3.Visible = False
End Sub
Private Sub end_Click()
End
End Sub
Private Sub Command8_Click()
End
End Sub
Private Sub Command9_Click()
If Text5.Text = "aibbuemc" Then
For b = 1 To i
If user$(b, 1) = Text6.Text Then user$(b, 4) = Str$(Val(user$(b, 4)) + Val(Text7.Text))
Next b
Open "f:\user" For Output As #1
For b = 1 To i
Print #1, user$(b, 1); ","; user$(b, 2); ","; user$(b, 3); ","; user$(b, 4); ","
Next b
Close #1
Text7.Text = "0.00"
Label3.Caption = "00:00"
End If
If Text5.Text <> "aibbuemc" Then Text5.Text = ""
End Sub
Private Sub Form_Load()
ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)
Dim rtn
rtn = SetWindowPos(Form1.hwnd, -1, 0, 0, 0, 0, 3)
Label5.Visible = False
Picture1.Left = 3120
Picture1.Top = 3060
Picture2.Left = 3120
Picture2.Top = 3060
Picture3.Left = 3120
Picture3.Top = 3060
Picture2.Visible = False
Picture3.Visible = False
Dim da$
Open "f:\user" For Input As #1
Do Until EOF(1)
i = i + 1
Line Input #1, da$
Print da$
c = 0
w = 0
For m = 1 To Len(da$)
If Right$(Left$(da$, m), 1) = "," Then
c = c + 1
user$(i, c) = Right$(Left$(da$, m - 1), m - w - 1)
w = m
End If
Next m
Loop
Close #1
SetWindowPos Form1.hwnd, -1, Form1.Left / 15, Form1.Top / 15, Form1.Width / 15, Form1.Height / 15, &H10 Or &H40
Form1.Show
End Sub
Private Sub Text1_Click()
Text1.Text = ""
End Sub
Private Sub Text2_Click()
Text2.Text = ""
If Text1.Text = "fanyi" Then Label5.Visible = True
If Text1.Text <> "fanyi" Then Label5.Visible = False
For k = 1 To i
If user$(k, 1) = Text1.Text Then
o = k
Label1.Caption = user$(k, 4)
Label4.Caption = Int(Val(Label1.Caption) * 50)
tim.Caption = "还有" + Str(Label4.Caption) + " 分钟"
End If
Next k
If user$(o, 4) < 1 Then
Picture1.Visible = False
Picture2.Visible = False
Picture3.Visible = True
End If
End Sub
Private Sub Text3_click()
If Text4.Text = "12345678" Then Label2.Caption = "非法密码"
Text3.Text = ""
Randomize Timer
lssj = Val(Text4.Text)
a1:
lshm$ = Str(Int(Rnd(Val(lssj)) * 99999))
lshm$ = Right(lshm$, Len(lshm$) - 1)
For p = 1 To Len(lshm$)
If Right(Left(lshm$, p), 1) = "0" Then lshm$ = Left(lshm$, p - 1) + Right(Str(Int(Rnd(Val(lshm$)) * 9) + 1), 1) + Right(lshm$, Len(lshm$) - p)
Next p
For b = 1 To i
If user$(b, 2) = lshm$ Then lssj = lssj + 1: GoTo a1:
Next b
Label2.Caption = lshm$
End Sub
Private Sub Text4_Click()
Text4.Text = ""
End Sub
Private Sub Text5_Click()
Text5.Text = ""
Label3.Caption = Val(Text7.Text) * 50
End Sub
Private Sub Text6_Click()
Text6.Text = ""
End Sub
Private Sub Text7_Click()
Text7.Text = ""
For b = 1 To i
If Text6.Text <> user$(b, 1) Then lssj = lssj + 1
Next b
If lssj = i Then Text6.Text = "用户名错误"
End Sub
Private Sub Timer1_Timer()
Timer1.Tag = Timer1.Tag + 1
If Int(Timer1.Tag / 60) * 60 = Timer1.Tag Then
user$(o, 4) = Str(Val(user$(o, 4)) - 0.02)
tim.Caption = "还有" + Str(Val(user$(o, 4)) * 50) + " 分钟"
Open "f:\user" For Output As #1
For b = 1 To i
Print #1, user$(b, 1); ","; user$(b, 2); ","; user$(b, 3); ","; user$(b, 4); ","
Next b
Close #1
Open "f:\money" For Input As #2
Do Until EOF(2)
Line Input #2, mon$
Loop
Close #2
mon$ = Str(Val(mon$) + 0.02)
Open "f:\money" For Output As #3
Print #3, mon$
Close #3
End If
If Val(user$(o, 4)) < 1 Then
SetWindowPos Form1.hwnd, -1, Form1.Left / 15, Form1.Top / 15, Form1.Width / 15, Form1.Height / 15, &H10 Or &H40
Form1.Show
Form1.WindowState = 2
Picture1.Visible = False
Picture2.Visible = False
Picture3.Visible = True
Text6.Text = user$(o, 1)
Timer1.Interval = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -