|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
本帖最后由 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
需要指定线程
|
|