如何用VB制作开机密码程序
来源:百度知道 编辑:UC知道 时间:2024/05/05 19:01:14
这是因为你没把鼠标限制到登录窗体的缘故
Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function GetForegroundWindow Lib "user32" () As Long
Private Declare Function CloseWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Timer1_Timer()
Dim ding As RECT, hunf As Long, wh As Long
wh = GetForegroundWindow()
If wh <> Me.hwnd Then CloseWindow wh
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3
GetWindowRect Me.hwnd,