|
本帖最后由 liucqa 于 2012-9-9 00:44 编辑
Public Function mInputBox(ByRef PictureData() As Byte, Optional ByVal picX As Long = 10, Optional ByVal picY As Long = 10)
Dim hInst As Long, IThreadId
mPictureData = PictureData
mPicX = picX
mPicY = picY
hInst = Application.Hinstance
If hHook = 0 Then IThreadId = GetCurrentThreadId
hHook = SetWindowsHookEx(WH_CBT, AddressOf HookProc, ByVal hInst, IThreadId)
sCaption = "请输入验证码:"
mInputBox = InputBox("", sCaption)
If hHook <> 0 Then
UnhookWindowsHookEx hHook
hHook = 0
End If
SetWindowLong hwndInput, GWL_WNDPROC, oldProcInput
oldProcInput = 0
hwndInput = 0
Erase mPictureData
End Function
需要指定线程
|
|