📄 password.frm
字号:
VERSION 5.00
Begin VB.Form Form5
BorderStyle = 1 'Fixed Single
Caption = "输入密码......"
ClientHeight = 750
ClientLeft = 1860
ClientTop = 2850
ClientWidth = 6390
Icon = "password.frx":0000
LinkTopic = "Form5"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 750
ScaleWidth = 6390
Visible = 0 'False
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消"
Height = 345
Left = 5460
TabIndex = 1
Top = 210
Width = 795
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 345
Left = 4440
TabIndex = 2
Top = 210
Width = 795
End
Begin VB.TextBox Text1
Height = 285
IMEMode = 3 'DISABLE
Left = 1050
PasswordChar = "#"
TabIndex = 0
Top = 240
Width = 3255
End
Begin VB.Label Label1
Caption = "输入密码:"
Height = 525
Left = 150
TabIndex = 3
Top = 270
Width = 1305
End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim strIniFile As String
Public Sub Command1_Click()
Dim PW As String
Dim ValueType As Long
'从注册表中读取屏幕保护密码的值。其值位于"\HKEY_CURRENT_USER\Control Panel\desktop\ScreenSave_Data"
'RetString = Query_Reg_Value("Control Panel\desktop", "ScreenSave_Data", ValueType)
'PW = Getsecret
PW = myReadINI(strIniFile, "SuperScreenSaver Config", "PassWord", "")
If Text1.Text = StrConv(PW, vbUnicode) Then
EndSaver
Else
Call Command2_Click
End If
End Sub
Private Sub Command2_Click()
ShowCursor False
beEnd = False
GetCursorPos mouse
oldX = mouse.X
oldY = mouse.Y
Form1.Timer1.Enabled = True
Unload Me
End Sub
Private Sub Form_Load()
ShowCursor True
strIniFile = App.Path & IIf(Len(App.Path) < 4, App.EXEName & ".ini", "\" & App.EXEName & ".ini")
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
ShowCursor True
End Sub
Private Sub Form_Unload(Cancel As Integer)
ShowCursor False
beEnd = False
GetCursorPos mouse
oldX = mouse.X
oldY = mouse.Y
Form1.Timer1.Enabled = True
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
Call Command1_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -