📄 frmscreen.frm
字号:
VERSION 5.00
Begin VB.Form frmScreen
AutoRedraw = -1 'True
BorderStyle = 0 'None
ClientHeight = 5790
ClientLeft = 0
ClientTop = 0
ClientWidth = 7335
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 5790
ScaleWidth = 7335
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin VB.PictureBox Picture1
BorderStyle = 0 'None
Height = 3855
Left = 600
Picture = "frmScreen.frx":0000
ScaleHeight = 3855
ScaleWidth = 6255
TabIndex = 2
Top = 600
Width = 6255
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 1
Top = 2880
Width = 1935
End
Begin VB.TextBox Text1
Height = 270
Left = 2040
TabIndex = 0
Top = 2400
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "取消锁定"
Default = -1 'True
Height = 375
Left = 4440
TabIndex = 3
Top = 2880
Width = 1215
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "密码:"
Height = 255
Left = 1200
TabIndex = 6
Top = 2880
Width = 855
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "管理员:"
Height = 255
Left = 1200
TabIndex = 5
Top = 2400
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "该计算机已经被管理锁定,只有管理员才能解除锁定"
Height = 495
Left = 1320
TabIndex = 4
Top = 1680
Width = 3135
End
Begin VB.Image Image1
Height = 855
Left = 240
Picture = "frmScreen.frx":3B7B
Stretch = -1 'True
Top = 480
Width = 975
End
Begin VB.Image Image2
Height = 225
Left = 5940
Top = 90
Width = 255
End
End
End
Attribute VB_Name = "frmScreen"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
With frmMain.Data8.Recordset
.MoveFirst
For i = 1 To .RecordCount
If .Fields("用户名称") = Text1.Text And .Fields("用户密码") = Text2.Text Then
If .Fields("用户名称") = UserName Or .Fields("权限") = "D" Then
Dim pOld As Boolean
SystemParametersInfoByRef 97, False, pOld, 0
Unload Me
Exit Sub
End If
End If
.MoveNext
Next i
End With
End Sub
Private Sub Form_Load()
Label1.Caption = "该计算机已经被 " & UserName & " 锁定,只有超级管理员和" & UserName & "才能解除锁定"
Dim hdc As Long, sx As Integer, sy As Integer
Dim hOldPattern As Long, bBmp(0 To 15) As Byte
Dim hBitmap As Long, hPattern As Long, hDCScreen As Long
Dim pOld As Boolean
SystemParametersInfoByRef 97, True, pOld, 0
sx = Screen.Width \ Screen.TwipsPerPixelX
sy = Screen.Height \ Screen.TwipsPerPixelY
hdc = GetDC(0)
'MsgBox sy, , sx
'抓图
BitBlt Me.hdc, 0, 0, sx, sy, hdc, 0, 0, vbSrcCopy
ReleaseDC 0, hdc
bBmp(0) = &H55: bBmp(2) = &HAA: bBmp(4) = &H55: bBmp(6) = &HAA
bBmp(8) = &H55: bBmp(10) = &HAA: bBmp(12) = &H55: bBmp(14) = &HAA
'使屏幕变暗
For TmpLoop = -639 To sy Step 2
Me.Line (TmpLoop * 15, 0)-((TmpLoop + sy) * 15, sy * 15)
Me.Line ((TmpLoop + sy) * 15, 1)-(TmpLoop * 15, sy * 15)
Next TmpLoop
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 1 Or 2
End Sub
Private Sub Form_Resize()
Picture1.Left = (Me.Width - Picture1.Width) / 2
Picture1.Top = (Me.Height - Picture1.Height) / 2 - 800
End Sub
Private Sub Image2_Click()
Command1_Click
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -