SetWindowsHookExでフックをいろいろやってみましたができません・・・orz 最初、WH_KEYBOARDをやったらWM_KEYDOWNより前に送られてるのでダメ・・・ で、PostでなくSendされてるのでWH_GETMESSAGEではキャッチできず・・・ WH_CALLWNDPROCでは >The hook procedure can examine the message; it cannot modify it. となっていてブロックできず・・・
Dim lngCount As Long Dim lngIconHandle(0) As Long Dim lngRet As Long
Do While True lngRet = ExtractIconEx(App.Path & "\test.ico", 0, 0, lngIconHandle(0), 1) If lngRet <> 1 Then Stop End If lngRet = DestroyIcon(lngIconHandle(0)) If lngRet = 0 Then Stop End If lngCount = lngCount + 1 Loop
Dim lngCount As Long Dim lngIconHandle(1) As Long Dim lngRet As Long
Do While True lngRet = ExtractIconEx(App.Path & "\test.ico", 0, lngIconHandle(1), lngIconHandle(0), 1) If lngRet <> 1 Then Stop End If lngRet = DestroyIcon(lngIconHandle(0)) If lngRet = 0 Then Stop End If lngRet = DestroyIcon(lngIconHandle(1)) If lngRet = 0 Then Stop End If lngCount = lngCount + 1 Loop
' アイコンハンドルを取得 Private Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" _ (ByVal lpszFile As String, _ ByVal nIconIndex As Long, _ ByRef phiconLarge As Long, _ ByRef phiconSmall As Long, _ ByVal nIcons As Long) As Long
' アイコンハンドルを破棄 Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As Long) As Long