让WebBrowser支持xp外观:
Private m_hMod As Long
Private m_hMod2 As Long
Private Declare Function InitCommonControlsEx Lib "comctl32.dll" (iccex As tagInitCommonControlsEx) As Boolean
Private Type tagInitCommonControlsEx
lngSize As Long
lngICC As Long
End Type
Private Const ICC_USEREX_CLASSES = &H200
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
Private Sub Form_Initialize()
On Error Resume Next
Dim iccex As tagInitCommonControlsEx
iccex.lngSize = LenB(iccex)
iccex.lngICC = ICC_USEREX_CLASSES
InitCommonControlsEx iccex
m_hMod = LoadLibrary("shell32.dll")
m_hMod2 = LoadLibrary("explorer.exe")
End Sub
Private Sub Form_Terminate()
On Error Resume Next
If m_hMod Then FreeLibrary m_hMod
If m_hMod2 Then FreeLibrary m_hMod2
End Sub