Created
January 7, 2016 08:08
-
-
Save kumatti1/0ec04b77ef5500739b93 to your computer and use it in GitHub Desktop.
WebBrowser1透過失敗
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Declare PtrSafe _ | |
Function SetWindowCompositionAttribute Lib "user32.dll" ( _ | |
ByVal hwnd As LongPtr, _ | |
st As Any _ | |
) As Long | |
Private Declare PtrSafe _ | |
Function WindowFromAccessibleObject Lib "oleacc.dll" ( _ | |
ByVal pacc As IAccessible, _ | |
hwnd As Any _ | |
) As Long | |
Private Sub UserForm_Initialize() | |
Dim hwnd As LongPtr | |
WindowFromAccessibleObject Me.WebBrowser1, hwnd | |
Dim st1(0 To 3) As Long | |
st1(0) = 3 | |
Dim st2(0 To 2) As Long | |
st2(0) = 19 | |
st2(1) = VarPtr(st1(0)) | |
st2(2) = 4 * 4 | |
Dim ret As Long | |
ret = SetWindowCompositionAttribute(hwnd, st2(0)) | |
Debug.Print ret | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment