自制 可爱版挂机锁
给出部分代码 (处理鼠标部分)Declare Function ShowCursor Lib "user32" (ByVal bShow As Integer) As Integer
。。。。。。。。。。。。。。。。
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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 Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
Const VK_SNAPSHOT As Byte = &H2C
Dim hWnd1 As Long
Private Sub Command1_Click()
While ShowCursor(True) < 0
Wend
Unload Form1
Call SetWindowPos(hWnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
Clipboard.Clear
End Sub
Private Sub Form_Load()
Call keybd_event(VK_SNAPSHOT, 0, 0, 0)
Form1.Picture = Clipboard.GetData(2)
hWnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hWnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
While ShowCursor(False) >= 0
Wend
End Sub
[[it] 本帖最后由 我是菜鸟哦 于 2008-9-7 14:18 编辑 [/it]]
可爱版挂机锁.rar
(392.24 KB)