Form3.frm
上传用户:albinfu
上传日期:2021-08-24
资源大小:71k
文件大小:7k
- VERSION 5.00
- Begin VB.Form Form3
- BorderStyle = 3 'Fixed Dialog
- Caption = "Form3"
- ClientHeight = 2850
- ClientLeft = 45
- ClientTop = 435
- ClientWidth = 7155
- Icon = "Form3.frx":0000
- LinkTopic = "Form3"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2850
- ScaleWidth = 7155
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 '窗口缺省
- Begin VB.Frame Frame3
- Height = 800
- Left = 3600
- TabIndex = 5
- Top = 2040
- Width = 3535
- Begin VB.CommandButton Command3
- Caption = "使用注册版"
- BeginProperty Font
- Name = "Arial"
- Size = 10.5
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 450
- Left = 2040
- TabIndex = 7
- Top = 240
- Width = 1410
- End
- Begin VB.TextBox Text2
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 380
- IMEMode = 3 'DISABLE
- Left = 100
- PasswordChar = "*"
- TabIndex = 6
- Top = 285
- Width = 1815
- End
- End
- Begin VB.Frame Frame2
- Height = 800
- Left = 50
- TabIndex = 2
- Top = 2040
- Width = 3495
- Begin VB.CommandButton Command1
- Caption = "同意说明,继续试用"
- BeginProperty Font
- Name = "Arial"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 500
- Left = 120
- TabIndex = 4
- Top = 200
- Width = 2055
- End
- Begin VB.CommandButton Command2
- Caption = "不同意"
- BeginProperty Font
- Name = "Arial"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 500
- Left = 2265
- TabIndex = 3
- Top = 200
- Width = 1095
- End
- End
- Begin VB.Frame Frame1
- Height = 2055
- Left = 50
- TabIndex = 0
- Top = -50
- Width = 7095
- Begin VB.Label Label1
- Caption = "Label1"
- BeginProperty Font
- Name = "Arial"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1800
- Left = 120
- TabIndex = 1
- Top = 120
- Width = 6930
- End
- End
- End
- Attribute VB_Name = "Form3"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Form3.Visible = False
- Form1.Visible = True
- Form1.Timer1.Enabled = True
- End Sub
- Private Sub Command2_Click()
- Unload Me
- End Sub
- Function RecordNumber() '=====记录条数====
- Dim fso, f, FF
- Set fso = CreateObject("scripting.filesystemobejct")
- If fso.fileexist("d:usb.txt") = False Then Exit Function
- Set f = fso.opentextfile("d:usb.txt", 1, True)
- FF = f.readall
- RecordNumber = f.Line - 1
- f.Close
- End Function
- Private Sub Command3_Click()
- SaveSetting "key", "U", 4, "yes"
- Form3.Visible = False
- MsgBox "已成功注册,谢谢使用!", vbInformation + vbOKOnly, "注册"
- Form1.Timer1.Enabled = True
- Form1.Visible = True
- End Sub
- Private Sub Form_Load()
- If App.PrevInstance Then
- MsgBox "程序已经在运行了,请查看任务栏右下角的箭头图标。副本将退出。", vbInformation + vbOKOnly, "提示"
- End
- End If
- Dim T1 As String, T2 As String, T3 As String, T4 As String, T5 As String, T6 As String
- Command3.Enabled = False
- If GetSetting("key", "U", 4, "") = "" Then SaveSetting "key", "U", 4, "no"
- If GetSetting("key", "K", 0, "") = "pass" Then
- SaveSetting "key", "U", 4, "no"
- MsgBox "请选择 ‘退出程序’ 来安全关闭程序,非正常关闭需重新设定密码。" & vbCrLf & vbCrLf & "请点击‘同意说明,继续试用‘修复以继续。", 48 + vbOKOnly, "请安全退出程序"
- End If
- If GetSetting("key", "U", 4, "") = "no" Then
- SaveSetting "key", "K", 0, "pass"
- ElseIf GetSetting("key", "U", 4, "") = "yes" Then
- Unload Me
- DoEvents
- Form1.Visible = True
- DoEvents
- ShowWindow Form1.hwnd, 9
- DoEvents
- Exit Sub
- End If
- Me.Top = Screen.Height / 2
- Me.Left = Screen.Width / 3
- SetWindowPos Form3.hwnd, -1, 0, 0, 0, 0, 3
- Form3.Caption = "欢迎使用:"
- T1 = "阅读注意事项:"
- T2 = "1. 本程序支持U盘及移动硬盘监控。目前仅适用于XP/Vista简体中文版,英文版/繁体版操作系统有可能无法正常运行。"
- T3 = "2. 清除可疑文件时,如果确认是正常文件,请选择‘是’或‘否’来决定是否删除文件。请找到U盘、移动硬盘根目录下‘隔离文件’文件夹内恢复误删文件。"
- T4 = "3. 内部测试版本,由于非法操作,系统文件丢失、系统环境不支持等意外因素,使用风险由用户自已承担。"
- T5 = "4. 请按正常退出方式退出程序,不要强行终止本程序,否则每次启动将弹出注册提示框。"
- T6 = "5. 使用本软件如遇到问题,请联系作者王磊(60009849) KEB4测试工程课. "
- Label1.Caption = T1 & vbCrLf & T2 & vbCrLf & T3 & vbCrLf & T4 & vbCrLf & T5 & vbCrLf & T6
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Shell_NotifyIcon NIM_DELETE, TrayI
- If GetSetting("key", "K", 0, "") = "pass" Then
- SaveSetting "key", "K", 0, "finish"
- End If
- End Sub
- Private Sub Text2_Change() '===新的密码算法======
- Dim A As String, B As String, H As Integer, m As Integer
- H = Hour(Now)
- If H < 10 Then
- A = "0" & H
- Else
- A = H
- End If
- m = Minute(Now)
- If m < 10 Then
- B = "0" & m
- Else
- B = m
- End If
- If Text2.Text = "234567" Or Text2.Text = "wanglei" & A & B Then
- Command3.Enabled = True
- Else
- Command3.Enabled = False
- End If
- End Sub