📄 frmlockup.frm
字号:
VERSION 5.00
Begin VB.Form frmLockup
BorderStyle = 1 'Fixed Single
Caption = "锁定"
ClientHeight = 1260
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
Icon = "frmLockup.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1260
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton CmdCancel
Caption = "取消"
Height = 375
Left = 3840
TabIndex = 5
Top = 720
Width = 615
End
Begin VB.CommandButton CmdOK
Caption = "确定"
Height = 375
Left = 3840
TabIndex = 4
Top = 120
Width = 615
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1080
PasswordChar = "*"
TabIndex = 1
Top = 720
Width = 2535
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 1080
PasswordChar = "*"
TabIndex = 0
Top = 120
Width = 2535
End
Begin VB.Label Label2
Caption = "确认密码"
Height = 255
Left = 120
TabIndex = 3
Top = 840
Width = 855
End
Begin VB.Label Label1
Caption = "输入密码"
Height = 255
Left = 120
TabIndex = 2
Top = 240
Width = 855
End
End
Attribute VB_Name = "frmLockup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdOK_Click()
On Error Resume Next
If Text1.Text = Text2.Text And Not (Text1 = "") And MDIpassword = "" Then
MDIpassword = Me.Text1.Text
frmMDI.ActiveForm.RichTextBox1.Locked = True
Text1.Text = ""
Text2.Text = ""
Me.Hide
frmMDI.Toolbar2.Item(1).Buttons(10).Value = tbrPressed
ElseIf Not Text1.Text = Text2.Text Then
MsgBox "密码不匹配!"
ElseIf Me.Text1.Text = "" Then
MsgBox "密码不能为空!"
Else
MsgBox "密码不正确!"
End If
frmMDI.ActiveForm.Enabled = True
End Sub
Private Sub CmdCancel_Click()
Me.Text1.Text = ""
Me.Text2.Text = ""
Me.Hide
frmoffice.Enabled = True
End Sub
Private Sub Form_Load()
On Error Resume Next
frmMDI.ActiveForm.Enabled = False
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
Private Sub Text1_Change()
Me.Text1.PasswordChar = "*"
End Sub
Private Sub Text2_Change()
Me.Text2.PasswordChar = "*"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -