Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
cBHO.cls
Package: IE_VB.rar [view]
Upload User: davilee3
Upload Date: 2015-04-22
Package Size: 986k
Code Size: 2k
Category:
Browser Client
Development Platform:
Visual Basic
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "cBHO"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- Option Explicit
- ' interfaces
- Implements IObjectWithSite
- ' private variables
- Private moUnknown As IUnknownVB
- Private WithEvents moBrowser As InternetExplorer
- Attribute moBrowser.VB_VarHelpID = -1
- Private mIsIE As Boolean
- Private Sub Class_Initialize()
- 'Load frmDebug
- 'ShowWindow frmDebug.hwnd, SW_NORMAL
- End Sub
- ' called when the parent wants
- ' to know what we're aiming at
- Private Sub IObjectWithSite_GetSite(ByVal priid As VBShellLib.REFIID, ppvObj As VBShellLib.VOID)
- ' return the interface we've got
- If Not (moUnknown Is Nothing) Then
- moUnknown.QueryInterface priid, ppvObj
- End If
- End Sub
- ' called on init to give us a
- ' pointer to the parent browser
- Private Sub IObjectWithSite_SetSite(ByVal pSite As VBShellLib.IUnknownVB)
- ' store the unknown
- Set moUnknown = pSite
- ' since this method is called again
- ' when the BHO is unloaded, we have to
- ' release our pointer
- If ObjPtr(pSite) = 0 Then
- CopyMemory moBrowser, 0&, 4
- Else
- ' get the IWebBrowser2 interface
- Set moBrowser = moUnknown
- Set IEBrowser = moBrowser
- mIsIE = (GetClassNameVb(moBrowser.hwnd) = ClassName_IEFrm)
- If mIsIE Then
- Call InstallMouseHook
- ' Load frmDebug
- ' ShowWindow frmDebug.hwnd, SW_NORMAL
- End If
- End If
- End Sub
- Private Sub moBrowser_NewWindow2(ppDisp As Object, Cancel As Boolean)
- On Error Resume Next
- Dim tDoc As Object
- Set tDoc = moBrowser.document
- Cancel = tDoc Is Nothing And Not vkPress(VK_CONTROL)
- End Sub
- Private Sub moBrowser_OnQuit()
- If mIsIE Then
- Call UninstallMouseHook
- Set IEBrowser = Nothing
- End If
- End Sub