Skip to content

Instantly share code, notes, and snippets.

@kumatti1
Created January 7, 2016 08:06
Show Gist options
  • Save kumatti1/77afc08a08f995369d67 to your computer and use it in GitHub Desktop.
Save kumatti1/77afc08a08f995369d67 to your computer and use it in GitHub Desktop.
WebBrowser非表示
Option Explicit
Private Declare PtrSafe _
Function WindowFromAccessibleObject Lib "oleacc.dll" ( _
ByVal pacc As IAccessible, _
hwnd As Any _
) As Long
Private Declare PtrSafe _
Function ShowWindow Lib "user32.dll" ( _
ByVal hwnd As LongPtr, _
ByVal nCmdShow As Long _
) As Long
Private Sub UserForm_Initialize()
Dim hwnd As LongPtr
WindowFromAccessibleObject Me.WebBrowser1, hwnd
ShowWindow hwnd, vbHide
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment